diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 22:36:31 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 22:36:31 +0000 |
commit | f0ab3858e266f33cbf6140da699200612289f808 (patch) | |
tree | dd7102fc0c6b505a3dfd95f19c92f8b704b5b5c6 /wk5/pset | |
parent | 2bfe9fd49e34b09810c4c235b8b039ab9b9d8735 (diff) |
Sun, Apr 28, 2024, 3:36 PM -07:00
Diffstat (limited to 'wk5/pset')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |