]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.3349: eval test for scriptversion fails v8.2.3349
authorBram Moolenaar <Bram@vim.org>
Sun, 15 Aug 2021 12:39:13 +0000 (14:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 15 Aug 2021 12:39:13 +0000 (14:39 +0200)
Problem:    Eval test for scriptversion fails.
Solution:   Fix off-by-one error.

src/version.c
src/vim9script.c

index 21efafcef4262dd60194476d73c53046ca6cf6e1..e177a05087a7a8ed056590c28f02ab32c8f275fc 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3349,
 /**/
     3348,
 /**/
index 19991097a03cf36b0ba37d45dad7222bda6f5e29..9ddc48930328dd13015651c2f3e8bfe5e5ccac28 100644 (file)
@@ -40,8 +40,8 @@ in_vim9script(void)
     int
 in_old_script(int max_version)
 {
-    return (current_sctx.sc_version <= max_version
-                                        && !(cmdmod.cmod_flags & CMOD_VIM9CMD))
+    return (current_sctx.sc_version < max_version
+                                       && !(cmdmod.cmod_flags & CMOD_VIM9CMD))
                || (cmdmod.cmod_flags & CMOD_LEGACY);
 }