diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 23:14:07 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 23:14:07 +0000 |
commit | 5fa305570723eb2e14f4b52fadd8d13960af3b43 (patch) | |
tree | b76672f72816f6d86772d912849cb0090958054c /wk5/pset/speller | |
parent | f3a427355582b16f56275f71749d9ee92c15b6dd (diff) |
Sun, Apr 28, 2024, 4:14 PM -07:00
Diffstat (limited to 'wk5/pset/speller')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index c158acd..a4e65fe 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -25,9 +25,9 @@ int size = 0; bool check(const char *word) { // hash word to find bucket - int head = hash(word); - node *current = table(head); + node *current = table(hash(word)); + // check all nodes in the bucket while (current != NULL) { // check if this is the word @@ -35,7 +35,6 @@ bool check(const char *word) { return true; } - // move on to next node current = current->next; } |