From 9a47911873cbdac819d4b49614e9fb2738fd8a04 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Mon, 29 Apr 2024 04:00:56 +0000 Subject: Sun, Apr 28, 2024, 9:00 PM -07:00 --- wk5/pset/speller/dictionary.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'wk5/pset/speller') 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); } -- cgit v1.2.3