0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.1338: Vim9: assigning to script-local variable doesn't check type

Problem:    Vim9: assigning to script-local variable doesn't check type.
Solution:   Use the type. (issue #6591)
This commit is contained in:
Bram Moolenaar
2020-08-01 15:38:38 +02:00
parent 586268721d
commit 8e4c8c853e
4 changed files with 57 additions and 21 deletions

View File

@@ -1422,6 +1422,11 @@ call_def_function(
dict_T *dict = tv_dict->vval.v_dict;
dictitem_T *di;
if (dict == NULL)
{
emsg(_(e_dictnull));
goto on_error;
}
if (key == NULL)
key = (char_u *)"";
tv = STACK_TV_BOT(-3);