From ebfa5391ffceb15dfbf2e4ad8741e4893e160423 Mon Sep 17 00:00:00 2001
From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com>
Date: Mon, 19 Feb 2024 20:29:57 +0000
Subject: Mon, Feb 19, 2024, 12:29 PM -08:00

---
 wk3/pset/runoff/runoff.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'wk3/pset/runoff/runoff.c')

diff --git a/wk3/pset/runoff/runoff.c b/wk3/pset/runoff/runoff.c
index 25e3032..c9ede93 100644
--- a/wk3/pset/runoff/runoff.c
+++ b/wk3/pset/runoff/runoff.c
@@ -148,8 +148,12 @@ void tabulate(void)
         {
             for (int k = 0; k < candidate_count; k++)
             {
-                if (!strcmp(preferences[i][j], candidates[k].name)) {
-                    if (candidates[k].eliminated)
+                if (!strcmp(preferences[i][j], candidates[k].name))
+                {
+                    if (!candidates[k].eliminated)
+                    {
+                        candidates[k].votes++;
+                    }
                 }
             }
         }
-- 
cgit v1.2.3