1
0
forked from aniani/vim

patch 8.2.2537: Vim9: crash when map() fails

Problem:    Vim9: crash when map() fails.
Solution:   Clear typval before using it. (closes #7884)
This commit is contained in:
Bram Moolenaar
2021-02-21 16:20:18 +01:00
parent dc167465f8
commit 027c4ab4d2
3 changed files with 24 additions and 0 deletions

View File

@@ -2145,6 +2145,7 @@ filter_map(typval_T *argvars, typval_T *rettv, filtermap_T filtermap)
arg_errmsg, TRUE)))
break;
set_vim_var_string(VV_KEY, di->di_key, -1);
newtv.v_type = VAR_UNKNOWN;
r = filter_map_one(&di->di_tv, expr, filtermap,
&newtv, &rem);
clear_tv(get_vim_var_tv(VV_KEY));