summaryrefslogtreecommitdiff
path: root/wk5/pset/speller
diff options
context:
space:
mode:
Diffstat (limited to 'wk5/pset/speller')
-rw-r--r--wk5/pset/speller/dictionary.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c
index 32b3ff9..6548bdf 100644
--- a/wk5/pset/speller/dictionary.c
+++ b/wk5/pset/speller/dictionary.c
@@ -74,7 +74,7 @@ bool load(const char *dictionary)
char word[LENGTH + 1];
// use fscanf(file, "%s", word) to grab words
// check for ended file
- while(fscanf(source, "%s", word) != 0)
+ while(fscanf(source, "%s", word) == 1)
{
// update size int
siz++;
@@ -88,7 +88,7 @@ bool load(const char *dictionary)
return false;
}
// copy word from fscanf into node using strcpy
- strcpy(word, ptr->word);
+ strcpy(ptr->word);
// set the new ptr
ptr->next = NULL;
// hash the word to find the bucket it goes in