Skip to content

Commit 05fe017

Browse files
committed
patch 7.4.1075
Problem: Crash when using an invalid command. Solution: Fix generating the error message. (Dominique Pelle)
1 parent 5fa4d44 commit 05fe017

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/ex_docmd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6916,6 +6916,7 @@ parse_addr_type_arg(value, vallen, argt, addr_type_arg)
69166916
int *addr_type_arg;
69176917
{
69186918
int i, a, b;
6919+
69196920
for (i = 0; addr_type_complete[i].expand != -1; ++i)
69206921
{
69216922
a = (int)STRLEN(addr_type_complete[i].name) == vallen;
@@ -6930,7 +6931,9 @@ parse_addr_type_arg(value, vallen, argt, addr_type_arg)
69306931
if (addr_type_complete[i].expand == -1)
69316932
{
69326933
char_u *err = value;
6933-
for (i=0; err[i] == NUL || !vim_iswhite(err[i]); i++);
6934+
6935+
for (i = 0; err[i] != NUL && !vim_iswhite(err[i]); i++)
6936+
;
69346937
err[i] = NUL;
69356938
EMSG2(_("E180: Invalid address type value: %s"), err);
69366939
return FAIL;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1075,
744746
/**/
745747
1074,
746748
/**/

0 commit comments

Comments
 (0)