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)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 80f918d..4007641 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7797,6 +7797,13 @@
: (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)