From 7852d78ca93d4daf4aa6fb562eb602302070229a Mon Sep 17 00:00:00 2001 From: Daniel Ryzhuk Date: Sat, 10 Oct 2020 06:45:49 +0000 Subject: [PATCH] Update 'cv2/program.c' --- cv2/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cv2/program.c b/cv2/program.c index 5d44312..31debfc 100644 --- a/cv2/program.c +++ b/cv2/program.c @@ -55,5 +55,7 @@ int compare_pizza(const void* pVoid1, const void* pVoid2) { float r = price1 - price2; if (r > 0.) return 1; if (r < 0.) return -1; - if (r == 0.) return 0; + char* name1 = pPizza1->name; + char* name2 = pPizza2->name; + if (r == 0.) return strcmp(name1,name2); } \ No newline at end of file