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

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)
This commit is contained in:
Bram Moolenaar
2022-04-01 15:26:58 +01:00
parent ffe6e646dc
commit 22ebd172e4
8 changed files with 26 additions and 11 deletions

View File

@@ -1988,7 +1988,7 @@ execute_storerange(isn_T *iptr, ectx_T *ectx)
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