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

patch 8.2.2095: Vim9: crash when failed dict member is followed by concat

Problem:    Vim9: crash when failed dict member is followed by concatenation.
Solution:   Remove the dict from the stack. (closes #7416)
This commit is contained in:
Bram Moolenaar
2020-12-05 18:13:27 +01:00
parent d0fe620cbb
commit 4029cabbe7
3 changed files with 30 additions and 0 deletions

View File

@@ -2669,6 +2669,15 @@ call_def_function(
{
SOURCING_LNUM = iptr->isn_lnum;
semsg(_(e_dictkey), key);
// If :silent! is used we will continue, make sure the
// stack contents makes sense.
clear_tv(tv);
--ectx.ec_stack.ga_len;
tv = STACK_TV_BOT(-1);
clear_tv(tv);
tv->v_type = VAR_NUMBER;
tv->vval.v_number = 0;
goto on_fatal_error;
}
clear_tv(tv);