diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-11-22 20:10:18 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-22 20:10:18 +0000 |
commit | 3b3755fe19e9ded2a1c45f14b2c6fa065bcaf2c6 (patch) | |
tree | 92ed5f9e604bc7f42fcf6ddf0fd2499f46accb85 /src/eval.c | |
parent | 7a53f29c031f54ab67a803e5e3f8cb44e4edc4bc (diff) |
patch 8.2.3650: Vim9: for loop variable can be a list memberv8.2.3650
Problem: Vim9: for loop variable can be a list member.
Solution: Check for valid variable name. (closes #9179)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 41291a2441..0e8b6a6776 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1128,7 +1128,7 @@ get_lval( wrong = (lp->ll_dict->dv_scope == VAR_DEF_SCOPE && rettv->v_type == VAR_FUNC && var_wrong_func_name(key, lp->ll_di == NULL)) - || !valid_varname(key, TRUE); + || !valid_varname(key, -1, TRUE); if (len != -1) key[len] = prevval; if (wrong) |