patch 8.2.4041: using unitialized pointer
Problem: Using unitialized pointer.
Solution: Store "ht" when variable is in another script.
diff --git a/src/evalvars.c b/src/evalvars.c
index 965b204..3be9993 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2898,7 +2898,11 @@
dictitem_T *di = find_var_in_ht(ht, 0, p + 1, no_autoload);
if (di != NULL)
+ {
+ if (htp != NULL)
+ *htp = ht;
return di;
+ }
}
}
}
diff --git a/src/version.c b/src/version.c
index 9e4ae19..27512d4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4041,
+/**/
4040,
/**/
4039,