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.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/version.c b/src/version.c
index 545b635..fe4e418 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1075,
+/**/
1074,
/**/
1073,
diff --git a/src/vim9expr.c b/src/vim9expr.c
index b765448..58ff395 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -796,7 +796,7 @@
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;