commit | a909c48bec1f7ae13a9143b5d627c40cac5b240e | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Thu Jan 06 22:07:57 2022 +0000 |
committer | Bram Moolenaar <Bram@vim.org> | Thu Jan 06 22:07:57 2022 +0000 |
tree | 2388890d96c11a9c0a122ad5b11cb8925c65f37e | |
parent | 11de43d2d476c449587f1f0712924890ab677708 [diff] [blame] |
patch 8.2.4023: using uninitialized variable Problem: Using uninitialized variable. Solution: Initialize "ufunc" also when an item is not exported.
diff --git a/src/vim9script.c b/src/vim9script.c index 815ded1..81f3967 100644 --- a/src/vim9script.c +++ b/src/vim9script.c
@@ -565,6 +565,7 @@ 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 @@ return -1; } *type = sv->sv_type; - *ufunc = NULL; } else {