Commit: patch 9.1.1075: Vim9: len variable not used in compile_load()

2 views
Skip to first unread message

Christian Brabandt

unread,
Feb 4, 2025, 10:45:14 AM2/4/25
to vim...@googlegroups.com
patch 9.1.1075: Vim9: len variable not used in compile_load()

Commit: https://github.com/vim/vim/commit/f7cb9f9280c675537a1536864d58e32adf35d344
Author: Hirohito Higashi <h.eas...@gmail.com>
Date: Tue Feb 4 16:37:19 2025 +0100

patch 9.1.1075: Vim9: len variable not used in compile_load()

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.eas...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/version.c b/src/version.c
index 545b6354d..fe4e41810 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1075,
/**/
1074,
/**/
diff --git a/src/vim9expr.c b/src/vim9expr.c
index b76544869..58ff395f9 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -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;

Reply all
Reply to author
Forward
0 new messages