diff options
Diffstat (limited to 'wk5/pset')
-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; } |