diff options
Diffstat (limited to 'wk5/pset/speller/dictionary.c')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |