From d7272a55ca3372773714c3cb8a6a54a47f21e817 Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Thu, 7 Apr 2022 16:13:25 +0200 Subject: [PATCH] ds --- du5/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/du5/program.c b/du5/program.c index ee7ac67..e1e3610 100644 --- a/du5/program.c +++ b/du5/program.c @@ -68,7 +68,7 @@ int compare(const void* p1, const void* p2){ int res=(s2->votes)-(s1->votes); for(int idx=0; res==0||(s1->name[idx])!='\0';idx++){ - res=(int)(s2->name[idx])-(int)(s1->votes[idx]); + res=(int)(s2->name[idx])-(int)(s1->name[idx]); } return (s2->votes)-(s1->votes);