]> granicus.if.org Git - vim/commitdiff
patch 8.2.1565: spellfile test sometimes fails v8.2.1565
authorBram Moolenaar <Bram@vim.org>
Wed, 2 Sep 2020 10:58:48 +0000 (12:58 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 2 Sep 2020 10:58:48 +0000 (12:58 +0200)
Problem:    Spellfile test sometimes fails.
Solution:   Check running into the end of the file.

src/spellfile.c
src/version.c

index 12dedd6c573a445e8467b7706d54e5350d736e5f..869db7f3ff4ead69d119131a92e51ecdb8ab3380 100644 (file)
@@ -3533,8 +3533,7 @@ 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 (!vim_isdigit(*skipwhite(line)))
+    if (vim_fgets(line, MAXLINELEN, fd) || !vim_isdigit(*skipwhite(line)))
        semsg(_("E760: No word count in %s"), fname);
 
     /*
index 03612aa0678e0d71373e2f8f0c085cbe66a887b3..bbbb26e311f4d06e12e5647cc154f10f1e51dee2 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1565,
 /**/
     1564,
 /**/