0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4822: setting ufunc to NULL twice

Problem:    Setting ufunc to NULL twice.
Solution:   Set ufunc to NULL in find_exported(). (closes #19275)
This commit is contained in:
LemonBoy
2022-04-24 21:55:00 +01:00
committed by Bram Moolenaar
parent aac12daa61
commit af59e34f1b
3 changed files with 5 additions and 2 deletions

View File

@@ -6159,7 +6159,7 @@ handle_subscript(
char_u *exp_name; char_u *exp_name;
int cc; int cc;
int idx; int idx;
ufunc_T *ufunc = NULL; ufunc_T *ufunc;
type_T *type; type_T *type;
// Found script from "import {name} as name", script item name must // Found script from "import {name} as name", script item name must

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
4822,
/**/ /**/
4821, 4821,
/**/ /**/

View File

@@ -710,6 +710,8 @@ find_exported(
svar_T *sv; svar_T *sv;
scriptitem_T *script = SCRIPT_ITEM(sid); scriptitem_T *script = SCRIPT_ITEM(sid);
*ufunc = NULL;
if (script->sn_import_autoload && script->sn_state == SN_STATE_NOT_LOADED) if (script->sn_import_autoload && script->sn_state == SN_STATE_NOT_LOADED)
{ {
if (do_source(script->sn_name, FALSE, DOSO_NONE, NULL) == FAIL) if (do_source(script->sn_name, FALSE, DOSO_NONE, NULL) == FAIL)
@@ -724,7 +726,6 @@ find_exported(
if (idx >= 0) if (idx >= 0)
{ {
sv = ((svar_T *)script->sn_var_vals.ga_data) + idx; sv = ((svar_T *)script->sn_var_vals.ga_data) + idx;
*ufunc = NULL;
if ((sv->sv_flags & SVFLAG_EXPORTED) == 0) if ((sv->sv_flags & SVFLAG_EXPORTED) == 0)
{ {
if (verbose) if (verbose)