From 83872efa5ba1d4d0f641b09892b012c3d397d339 Mon Sep 17 00:00:00 2001 From: kukemuna Date: Tue, 27 Feb 2024 20:39:17 +0200 Subject: [PATCH] automated commit by check50 [check50=True] --- runoff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runoff.c b/runoff.c index fc964ef..66cb6cb 100644 --- a/runoff.c +++ b/runoff.c @@ -146,9 +146,10 @@ void tabulate(void) { for (int j = 0; j < candidate_count; j++) { - if (preferences[i][0] == j && !candidates[j].eliminated) + if (candidates[preferences[i][j]].eliminated == false) { - candidates[j].votes++; + candidates[preferences[i][j]].votes++; + break; } } }