changeset 26988:bef1f0167251 v8.2.4023

patch 8.2.4023: using uninitialized variable Commit: https://github.com/vim/vim/commit/a909c48bec1f7ae13a9143b5d627c40cac5b240e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 6 22:07:57 2022 +0000 patch 8.2.4023: using uninitialized variable Problem: Using uninitialized variable. Solution: Initialize "ufunc" also when an item is not exported.
author Bram Moolenaar <Bram@vim.org>
date Thu, 06 Jan 2022 23:15:04 +0100
parents 30b34e3440c9
children e6c75e80cb49
files src/version.c src/vim9script.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4023,
+/**/
     4022,
 /**/
     4021,
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -565,6 +565,7 @@ find_exported(
     if (idx >= 0)
     {
 	sv = ((svar_T *)script->sn_var_vals.ga_data) + idx;
+	*ufunc = NULL;
 	if (!sv->sv_export)
 	{
 	    if (verbose)
@@ -572,7 +573,6 @@ find_exported(
 	    return -1;
 	}
 	*type = sv->sv_type;
-	*ufunc = NULL;
     }
     else
     {