From 200ca8e2fe7556e7d11133ad48209b8dc0ddc348 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 28 Apr 2024 21:41:40 +0000 Subject: Sun, Apr 28, 2024, 2:41 PM -07:00 --- wk5/pset/speller/dictionary.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'wk5') diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 9d82029..95d4a95 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -45,6 +45,10 @@ bool load(const char *dictionary) { // Open dictionary file FILE *source = fopen(dictionary, "r"); + if (source == NULL) + { + return 1; + } //read each word in dictionary char c; -- cgit v1.2.3