I am getting 2 errors after check50. I am not able to get hold of any loopholes in the code. Kindly help!
1) :( handles max length (45-char) words
expected "MISSPELLED WOR...", not "MISSPELLED WOR..."
Log
running ./speller max_length/dict max_length/text...
checking for output "MISSPELLED WORDS\n\n\nWORDS MISSPELLED: 0\nWORDS IN DICTIONARY: 1\nWORDS IN TEXT: 1\n"...
Expected Output:
MISSPELLED WORDS
WORDS MISSPELLED: 0
WORDS IN DICTIONARY: 1
WORDS IN TEXT: 1
Actual Output:
MISSPELLED WORDS
pneumonoultramicroscopicsilicovolcanoconiosis
WORDS MISSPELLED: 1
WORDS IN DICTIONARY: 1
WORDS IN TEXT: 1
Apparently its shows that the word is in the dictionary but still is misspelt.
2) :( program is free of memory errors
I ran help50 on valgrind; it gives:
==23154== Conditional jump or move depends on uninitialised value(s)
Looks like you're trying to use a variable that might not have a value? Take a closer look at line 107 of dictionary.c.