diff options
author | LemonBoy <thatlemon@gmail.com> | 2022-04-24 21:55:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-24 21:55:00 +0100 |
commit | af59e34f1bf214ec6f2d0304c1c5b11ecda25a83 (patch) | |
tree | dba5ffd079bf486f9a75085951877ad6321b8517 | |
parent | aac12daa61d9e84616771ec9242fd232f46786e6 (diff) | |
download | vim-git-af59e34f1bf214ec6f2d0304c1c5b11ecda25a83.tar.gz |
patch 8.2.4822: setting ufunc to NULL twicev8.2.4822
Problem: Setting ufunc to NULL twice.
Solution: Set ufunc to NULL in find_exported(). (closes #19275)
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9script.c | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index f7445bf40..61b09fb6b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6159,7 +6159,7 @@ handle_subscript( char_u *exp_name; int cc; int idx; - ufunc_T *ufunc = NULL; + ufunc_T *ufunc; type_T *type; // Found script from "import {name} as name", script item name must diff --git a/src/version.c b/src/version.c index 36adeb6d6..612d9e060 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4822, +/**/ 4821, /**/ 4820, diff --git a/src/vim9script.c b/src/vim9script.c index bb5f0299d..b1bfe634c 100644 --- a/src/vim9script.c +++ b/src/vim9script.c @@ -710,6 +710,8 @@ find_exported( svar_T *sv; scriptitem_T *script = SCRIPT_ITEM(sid); + *ufunc = NULL; + if (script->sn_import_autoload && script->sn_state == SN_STATE_NOT_LOADED) { if (do_source(script->sn_name, FALSE, DOSO_NONE, NULL) == FAIL) @@ -724,7 +726,6 @@ find_exported( if (idx >= 0) { sv = ((svar_T *)script->sn_var_vals.ga_data) + idx; - *ufunc = NULL; if ((sv->sv_flags & SVFLAG_EXPORTED) == 0) { if (verbose) |