vim-patch:8.2.1565: spellfile test sometimes fails

Problem:    Spellfile test sometimes fails.
Solution:   Check running into the end of the file.
e90d63ea90
This commit is contained in:
Jan Edmund Lazo 2020-09-02 09:00:04 -04:00
parent cc64f2cc1d
commit 4bcca0baa9
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -3038,9 +3038,9 @@ static int spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
spin->si_msg_count = 999999;
// Read and ignore the first line: word count.
(void)vim_fgets(line, MAXLINELEN, fd);
if (!ascii_isdigit(*skipwhite(line)))
if (vim_fgets(line, MAXLINELEN, fd) || !ascii_isdigit(*skipwhite(line))) {
EMSG2(_("E760: No word count in %s"), fname);
}
// Read all the lines in the file one by one.
// The words are converted to 'encoding' here, before being added to