1
0
forked from aniani/vim

patch 9.0.1611: v:maxcol can be changed in a :for loop

Problem:    v:maxcol can be changed in a :for loop.
Solution:   Check for read-only loop variable. (closes #12470)
This commit is contained in:
Bram Moolenaar
2023-06-05 19:46:18 +01:00
parent d9a92dc70b
commit 16d2c02c80
3 changed files with 5 additions and 1 deletions

View File

@@ -3842,7 +3842,8 @@ set_var_const(
}
if ((flags & ASSIGN_FOR_LOOP) == 0
&& var_check_permission(di, name) == FAIL)
? var_check_permission(di, name) == FAIL
: var_check_ro(di->di_flags, name, FALSE))
goto failed;
}
else