diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 23:43:02 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 23:43:02 +0000 |
commit | ee7eac011f3d75933347636ead981dc91c65cace (patch) | |
tree | 4b6e54d152513bb46647ef34c17d12f635002109 | |
parent | 534e938e3bbc6096ee856293404c67cd9e55566e (diff) |
Sun, Apr 28, 2024, 4:43 PM -07:00
-rw-r--r-- | wk5/pset/speller/dictionary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 3a00555..8f212fc 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -69,13 +69,13 @@ 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) != E0F) + while(fscanf(source, "%s", word) != 0) { // update size int siz++; // create new node // use malloc - node *ptr = malloc(sizefo(node)); + node *ptr = malloc(sizeof(node)); // check if return is NULL if (ptr == NULL) { |