From f0ab3858e266f33cbf6140da699200612289f808 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 28 Apr 2024 22:36:31 +0000 Subject: Sun, Apr 28, 2024, 3:36 PM -07:00 --- wk5/pset/speller/dictionary.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wk5') diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index b550e36..b0d1323 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -67,8 +67,11 @@ bool load(const char *dictionary) } // copy word from fscanf into node using strcpy strcpy(ptr->word, word); + // set the new ptr ptr->next = NULL; + // hash the word to find the bucket it goes in int val = hash(word); + // if (table(val)->next != NULL) { char = 0; -- cgit v1.2.3