1
0
forked from aniani/vim

patch 8.2.2179: Vim9: crash when indexing a dict with a number

Problem:    Vim9: crash when indexing a dict with a number.
Solution:   Add ISN_STOREINDEX. (closes #7513)
This commit is contained in:
Bram Moolenaar
2020-12-21 17:30:50 +01:00
parent 2e2f52a4a0
commit 4f5e397756
7 changed files with 235 additions and 132 deletions

View File

@@ -55,8 +55,8 @@ typedef enum {
// ISN_STOREOTHER, // pop into other script variable isn_arg.other.
ISN_STORENR, // store number into local variable isn_arg.storenr.stnr_idx
ISN_STORELIST, // store into list, value/index/variable on stack
ISN_STOREDICT, // store into dictionary, value/index/variable on stack
ISN_STOREINDEX, // store into list or dictionary, type isn_arg.vartype,
// value/index/variable on stack
ISN_UNLET, // unlet variable isn_arg.unlet.ul_name
ISN_UNLETENV, // unlet environment variable isn_arg.unlet.ul_name
@@ -304,6 +304,7 @@ struct isn_S {
char_u *string;
varnumber_T number;
blob_T *blob;
vartype_T vartype;
#ifdef FEAT_FLOAT
float_T fnumber;
#endif