0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2299: Vim9: invalid memory access making error message flaky

Problem:    Vim9: invalid memory access making error message flaky.
Solution:   Do not check cmd_argt for CMD_USER. (issue #7467)
This commit is contained in:
Bram Moolenaar
2021-01-04 16:15:58 +01:00
parent cef1270dec
commit d1510ee946
6 changed files with 40 additions and 6 deletions

View File

@@ -7797,6 +7797,13 @@ compile_def_function(ufunc_T *ufunc, int check_return_type, cctx_T *outer_cctx)
: (int (*)(char_u *, size_t, void *, cctx_T *))lookup_local,
&cctx);
if (p == NULL)
{
if (cctx.ctx_skip != SKIP_YES)
emsg(_(e_ambiguous_use_of_user_defined_command));
goto erret;
}
if (p == ea.cmd && ea.cmdidx != CMD_SIZE)
{
if (cctx.ctx_skip == SKIP_YES)