diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-12 14:33:41 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-12 14:33:41 +0100 |
commit | 709664cca0b59b69caa1ed40ebfcf00b2c672693 (patch) | |
tree | 02c10d1f930402aee6e1dd3d554e35cc0935be4d /src/proto | |
parent | cc2335896ba707bf0d8cf03cca2de7c66fab62a0 (diff) | |
download | vim-git-709664cca0b59b69caa1ed40ebfcf00b2c672693.tar.gz |
patch 8.2.2131: Vim9: crash when lambda uses same var as assignmentv8.2.2131
Problem: Vim9: crash when lambda uses same var as assignment.
Solution: Do not let lookup_local change lv_from_outer, make a copy.
(closes #7461)
Diffstat (limited to 'src/proto')
-rw-r--r-- | src/proto/evalvars.pro | 2 | ||||
-rw-r--r-- | src/proto/ex_docmd.pro | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/proto/evalvars.pro b/src/proto/evalvars.pro index 39ea33893..0449ea57a 100644 --- a/src/proto/evalvars.pro +++ b/src/proto/evalvars.pro @@ -59,7 +59,7 @@ void check_vars(char_u *name, int len); dictitem_T *find_var(char_u *name, hashtab_T **htp, int no_autoload); dictitem_T *find_var_in_ht(hashtab_T *ht, int htname, char_u *varname, int no_autoload); hashtab_T *get_script_local_ht(void); -void *lookup_scriptvar(char_u *name, size_t len, cctx_T *dummy); +int lookup_scriptvar(char_u *name, size_t len, void *lvar, cctx_T *dummy); hashtab_T *find_var_ht(char_u *name, char_u **varname); char_u *get_var_value(char_u *name); void new_script_vars(scid_T id); diff --git a/src/proto/ex_docmd.pro b/src/proto/ex_docmd.pro index 374d3996b..46030a5fd 100644 --- a/src/proto/ex_docmd.pro +++ b/src/proto/ex_docmd.pro @@ -13,7 +13,7 @@ void undo_cmdmod(cmdmod_T *cmod); int parse_cmd_address(exarg_T *eap, char **errormsg, int silent); int checkforcmd(char_u **pp, char *cmd, int len); char_u *skip_option_env_lead(char_u *start); -char_u *find_ex_command(exarg_T *eap, int *full, void *(*lookup)(char_u *, size_t, cctx_T *), cctx_T *cctx); +char_u *find_ex_command(exarg_T *eap, int *full, int (*lookup)(char_u *, size_t, void *, cctx_T *), cctx_T *cctx); int modifier_len(char_u *cmd); int cmd_exists(char_u *name); cmdidx_T excmd_get_cmdidx(char_u *cmd, int len); |