diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-29 04:13:20 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-29 04:13:20 +0000 |
commit | 73413647c211da972997c1e8ff9ca9678036b863 (patch) | |
tree | 3a35b868a3e8cd272db191467af90362a6c4fb0f /wk5/pset | |
parent | 9a47911873cbdac819d4b49614e9fb2738fd8a04 (diff) |
Sun, Apr 28, 2024, 9:13 PM -07:00
Diffstat (limited to 'wk5/pset')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 9eda460..d02bee5 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -49,8 +49,7 @@ unsigned int hash(const char *word) { // (sum of (letter - 'A') % 26) of a word to get a value of where to store it in the hash table int val = 0; - int i = 0; - while (word[i] != "/0") + for (int i = 0; word[i] != /0; i++) { val += (word[i] % 26); } |