0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2693: Vim9: locked script variable can be changed

Problem:    Vim9: locked script variable can be changed.
Solution:   Check legacy script variable for being locked. (issue #8031)
This commit is contained in:
Bram Moolenaar
2021-04-02 14:44:02 +02:00
parent f5906aa780
commit dcf29ac87f
3 changed files with 17 additions and 2 deletions

View File

@@ -1942,6 +1942,9 @@ call_def_function(
store_var(name, STACK_TV_BOT(0));
else
{
SOURCING_LNUM = iptr->isn_lnum;
if (var_check_permission(di, name) == FAIL)
goto on_error;
clear_tv(&di->di_tv);
di->di_tv = *STACK_TV_BOT(0);
}