From ee7eac011f3d75933347636ead981dc91c65cace Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 28 Apr 2024 23:43:02 +0000 Subject: Sun, Apr 28, 2024, 4:43 PM -07:00 --- wk5/pset/speller/dictionary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wk5/pset') 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) { -- cgit v1.2.3