diff src/vim9execute.c @ 28273:fff70771d4bb v8.2.4662

patch 8.2.4662: no error for using out of range list index Commit: https://github.com/vim/vim/commit/22ebd172e48ba060c8a7bae3dbf6480b7596d937 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 1 15:26:58 2022 +0100 patch 8.2.4662: no error for using out of range list index Problem: No error for using out of range list index. Solution: Check list index at script level like in compiled function. (closes #10051)
author Bram Moolenaar <Bram@vim.org>
date Fri, 01 Apr 2022 16:30:03 +0200
parents c446812efd60
children c4b2aa8e1ee1
line wrap: on
line diff
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1988,7 +1988,7 @@ execute_storerange(isn_T *iptr, ectx_T *
 	else
 	    n2 = (long)tv_get_number_chk(tv_idx2, NULL);
 
-	li1 = check_range_index_one(tv_dest->vval.v_list, &n1, FALSE);
+	li1 = check_range_index_one(tv_dest->vval.v_list, &n1, TRUE, FALSE);
 	if (li1 == NULL)
 	    status = FAIL;
 	else