From f7cb9f9280c675537a1536864d58e32adf35d344 Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Tue, 4 Feb 2025 16:37:19 +0100 Subject: [PATCH] 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 Signed-off-by: Christian Brabandt --- src/version.c | 2 ++ src/vim9expr.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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;