mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -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:
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1687,
|
||||||
/**/
|
/**/
|
||||||
1686,
|
1686,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -6903,6 +6903,7 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
|
|||||||
if (ea.cmdidx != CMD_SIZE
|
if (ea.cmdidx != CMD_SIZE
|
||||||
&& ea.cmdidx != CMD_write && ea.cmdidx != CMD_read)
|
&& ea.cmdidx != CMD_write && ea.cmdidx != CMD_read)
|
||||||
{
|
{
|
||||||
|
if (ea.cmdidx >= 0)
|
||||||
ea.argt = excmd_get_argt(ea.cmdidx);
|
ea.argt = excmd_get_argt(ea.cmdidx);
|
||||||
if ((ea.argt & EX_BANG) && *p == '!')
|
if ((ea.argt & EX_BANG) && *p == '!')
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user