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:
@@ -1311,7 +1311,8 @@ get_lval(
|
||||
|
||||
lp->ll_dict = NULL;
|
||||
lp->ll_list = lp->ll_tv->vval.v_list;
|
||||
lp->ll_li = check_range_index_one(lp->ll_list, &lp->ll_n1, quiet);
|
||||
lp->ll_li = check_range_index_one(lp->ll_list, &lp->ll_n1,
|
||||
(flags & GLV_ASSIGN_WITH_OP) == 0, quiet);
|
||||
if (lp->ll_li == NULL)
|
||||
{
|
||||
clear_tv(&var2);
|
||||
|
Reference in New Issue
Block a user