Speller is showing an incorrect list of misspelled words and is reporting an incorrect number for both the misspelled words and text counts. This issue occurs with both the code I got from the pset zip file and with the staff's version.
I narrowed the problem down to the following: If the last word in the text file is a misspelled word but does not have and eol character then the misspelled list and the misspelled and text counts are incorrect. If the last word is not a misspelled word then only the text count is short by 1.
If the last word in the text file is a misspelled word and has an eol character at the end (effectively creating a blank line as the last line in the file) then the misspelled word list is correct and the misspelled and text counts are correct.
Attached is a screenshot showing the output from the pset.zip and the staff's versions of speller.
Here's the content of my test files:
trust <--no eol should follow this word to produce the problem.
Note: The format of one word per line is intentional
At this point, my code doesn't pass Check50 but I can't tell if it due to anything I've done or if the problem is this bug.