]> granicus.if.org Git - vim/commitdiff
patch 8.1.1833: allocating a bit too much when there is no bad word. v8.1.1833
authorBram Moolenaar <Bram@vim.org>
Fri, 9 Aug 2019 15:01:02 +0000 (17:01 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 9 Aug 2019 15:01:02 +0000 (17:01 +0200)
Problem:    Allocating a bit too much when spellbadword() does not find a bad
            word.
Solution:   Reset "len" when going to the next word. (Daniel Hahler,
            closes #4788)

src/evalfunc.c
src/version.c

index 07a6768c277bcd63ede60f6c76565c5e6f29605f..29857d318a014467587132b50e36b4ec1959433d 100644 (file)
@@ -10755,6 +10755,7 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
                }
                str += len;
                capcol -= len;
+               len = 0;
            }
        }
     }
index adbf13802a8a3e9afcb3f76158aa8b17d4b34a50..72dd651d2a9bfdfb8db46f12898b1a81f107c339 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1833,
 /**/
     1832,
 /**/