]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1075: Vim9: len variable not used in compile_load() v9.1.1075
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 4 Feb 2025 15:37:19 +0000 (16:37 +0100)
committerChristian Brabandt <cb@256bit.org>
Tue, 4 Feb 2025 15:40:08 +0000 (16:40 +0100)
Problem:  Vim9: length variable not used in compile_load()
Solution: use len instead of re-calculating the length
          (Hirohito Higashi)

closes: #16582

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/version.c
src/vim9expr.c

index 545b6354d07642c6804ba820c3e344b6f7fb74dc..fe4e418107ccc96da168d22d38c8a3635d49b1d7 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1075,
 /**/
     1074,
 /**/
index b76544869cce599621b219116c716a20971af9d9..58ff395f9e5bf97b3bb9a676e34712e9bafb0a38 100644 (file)
@@ -796,7 +796,7 @@ compile_load(
        int         outer_loop_depth = -1;
        int         outer_loop_idx = -1;
 
-       name = vim_strnsave(*arg, end - *arg);
+       name = vim_strnsave(*arg, len);
        if (name == NULL)
            return FAIL;