]> granicus.if.org Git - vim/commitdiff
patch 8.2.2730: Coverity complains about not restoring character v8.2.2730
authorBram Moolenaar <Bram@vim.org>
Tue, 6 Apr 2021 19:29:32 +0000 (21:29 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 6 Apr 2021 19:29:32 +0000 (21:29 +0200)
Problem:    Coverity complains about not restoring character.
Solution:   Also restore the character in case of an error.

src/version.c
src/vim9compile.c

index 8d44824a19aec2c6923ca010f8bf71610c8b5876..5850872fbf9ca844a8df4834df46cc82cd407a0c 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2730,
 /**/
     2729,
 /**/
index c9ca5953fc681d00ac1be424f3c17d1768a2cafc..feb1838b7b9a65aa768edc7da1357dd5f5035724 100644 (file)
@@ -6108,6 +6108,7 @@ compile_load_lhs(
        {
            // this should not happen
            emsg(_(e_missbrac));
+           var_start[varlen] = c;
            return FAIL;
        }
        var_start[varlen] = c;