diff src/vim9.h @ 23266:00f7cd9b6033 v8.2.2179

patch 8.2.2179: Vim9: crash when indexing a dict with a number Commit: https://github.com/vim/vim/commit/4f5e39775616795ac7d1c01bf15a1bd316feb387 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 21 17:30:50 2020 +0100 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 https://github.com/vim/vim/issues/7513)
author Bram Moolenaar <Bram@vim.org>
date Mon, 21 Dec 2020 17:45:04 +0100
parents 657216220293
children 112fa621b127
line wrap: on
line diff
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -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