Mercurial > vim
changeset 28596:daf785caecf2 v8.2.4822
patch 8.2.4822: setting ufunc to NULL twice
Commit: https://github.com/vim/vim/commit/af59e34f1bf214ec6f2d0304c1c5b11ecda25a83
Author: LemonBoy <thatlemon@gmail.com>
Date: Sun Apr 24 21:55:00 2022 +0100
patch 8.2.4822: setting ufunc to NULL twice
Problem: Setting ufunc to NULL twice.
Solution: Set ufunc to NULL in find_exported(). (closes https://github.com/vim/vim/issues/19275)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 24 Apr 2022 23:00:03 +0200 |
parents | a336c53b6ffb |
children | aba79a888ea5 |
files | src/eval.c src/version.c src/vim9script.c |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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,
--- 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)