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