diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-29 04:00:56 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-29 04:00:56 +0000 |
commit | 9a47911873cbdac819d4b49614e9fb2738fd8a04 (patch) | |
tree | 472e3e5fc782b06a23875faef9fe3d9008c50a18 /wk5/pset/speller | |
parent | f6fba277514a7aec1f7d078fd1b4c2ab8b538587 (diff) |
Sun, Apr 28, 2024, 9:00 PM -07:00
Diffstat (limited to 'wk5/pset/speller')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 615b3ba..9eda460 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -50,9 +50,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; - char *spill[LENGTH]; - strcpy(spill, word); - while (spill[i] != "/0") + while (word[i] != "/0") { val += (word[i] % 26); } |