From 13ef2caef4d5436363d7d025361ad4f08d901d1b Mon Sep 17 00:00:00 2001
From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com>
Date: Mon, 29 Apr 2024 01:47:24 +0000
Subject: Sun, Apr 28, 2024, 6:47 PM -07:00

---
 wk5/pset/speller/dictionary.c | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'wk5/pset/speller/dictionary.c')

diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c
index d5b0ac6..626e965 100644
--- a/wk5/pset/speller/dictionary.c
+++ b/wk5/pset/speller/dictionary.c
@@ -38,6 +38,10 @@ bool check(const char *word)
             return true;
         }
         // move on to next node
+        if (current->next == NULL)
+        {
+            return false;
+        }
         current = current->next;
     }
 
-- 
cgit v1.2.3