diff --git a/du5/program.c b/du5/program.c index a1d5d6f..eaf43a2 100644 --- a/du5/program.c +++ b/du5/program.c @@ -46,7 +46,7 @@ void bsortDesc(struct entry* list[80], int s){ else if (list[j]->votes == list[j + 1]->votes){ while (list[j]->name[count] == list[j + 1]->name[count]) count++; - if (list[j]->name[0] > list[j + 1]->name[0]){ + if (list[j]->name[count] > list[j + 1]->name[count]){ temp = list[j]; list[j] = list[j + 1]; list[j + 1] = temp;