Mercurial > vim
diff src/vim9script.c @ 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 | 294771aab3ae |
children | 9a7a2908e1a8 |
line wrap: on
line diff
--- 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)