forked from aniani/vim
patch 7.4.1075
Problem: Crash when using an invalid command. Solution: Fix generating the error message. (Dominique Pelle)
This commit is contained in:
@@ -6916,6 +6916,7 @@ parse_addr_type_arg(value, vallen, argt, addr_type_arg)
|
|||||||
int *addr_type_arg;
|
int *addr_type_arg;
|
||||||
{
|
{
|
||||||
int i, a, b;
|
int i, a, b;
|
||||||
|
|
||||||
for (i = 0; addr_type_complete[i].expand != -1; ++i)
|
for (i = 0; addr_type_complete[i].expand != -1; ++i)
|
||||||
{
|
{
|
||||||
a = (int)STRLEN(addr_type_complete[i].name) == vallen;
|
a = (int)STRLEN(addr_type_complete[i].name) == vallen;
|
||||||
@@ -6930,7 +6931,9 @@ parse_addr_type_arg(value, vallen, argt, addr_type_arg)
|
|||||||
if (addr_type_complete[i].expand == -1)
|
if (addr_type_complete[i].expand == -1)
|
||||||
{
|
{
|
||||||
char_u *err = value;
|
char_u *err = value;
|
||||||
for (i=0; err[i] == NUL || !vim_iswhite(err[i]); i++);
|
|
||||||
|
for (i = 0; err[i] != NUL && !vim_iswhite(err[i]); i++)
|
||||||
|
;
|
||||||
err[i] = NUL;
|
err[i] = NUL;
|
||||||
EMSG2(_("E180: Invalid address type value: %s"), err);
|
EMSG2(_("E180: Invalid address type value: %s"), err);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
@@ -741,6 +741,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 */
|
||||||
|
/**/
|
||||||
|
1075,
|
||||||
/**/
|
/**/
|
||||||
1074,
|
1074,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user