0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.1687: Vim9: out of bounds error

Problem:    Vim9: out of bounds error.
Solution:   Check that cmdidx is not negative.
This commit is contained in:
Bram Moolenaar
2020-09-14 22:39:11 +02:00
parent 71abe48289
commit 9b123d8590
2 changed files with 4 additions and 1 deletions

View File

@@ -6903,7 +6903,8 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
if (ea.cmdidx != CMD_SIZE
&& ea.cmdidx != CMD_write && ea.cmdidx != CMD_read)
{
ea.argt = excmd_get_argt(ea.cmdidx);
if (ea.cmdidx >= 0)
ea.argt = excmd_get_argt(ea.cmdidx);
if ((ea.argt & EX_BANG) && *p == '!')
{
ea.forceit = TRUE;