Skip to content

Commit 0246b5e

Browse files
committed
updated for version 7.4.617
Problem: Wrong ":argdo" range does not cause an error. Solution: Reset "cmd" to NULL. (Marcin Szamotulski, Ingo Karkat)
1 parent 39e127b commit 0246b5e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/ex_docmd.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4405,6 +4405,7 @@ get_address(ptr, addr_type, skip, to_other_file)
44054405
if (addr_type != ADDR_LINES)
44064406
{
44074407
EMSG(_(e_invaddr));
4408+
cmd = NULL;
44084409
goto error;
44094410
}
44104411
if (skip)
@@ -4436,6 +4437,7 @@ get_address(ptr, addr_type, skip, to_other_file)
44364437
if (addr_type != ADDR_LINES)
44374438
{
44384439
EMSG(_(e_invaddr));
4440+
cmd = NULL;
44394441
goto error;
44404442
}
44414443
if (skip) /* skip "/pat/" */
@@ -4484,6 +4486,7 @@ get_address(ptr, addr_type, skip, to_other_file)
44844486
if (addr_type != ADDR_LINES)
44854487
{
44864488
EMSG(_(e_invaddr));
4489+
cmd = NULL;
44874490
goto error;
44884491
}
44894492
if (*cmd == '&')
@@ -4575,7 +4578,8 @@ get_address(ptr, addr_type, skip, to_other_file)
45754578
n = getdigits(&cmd);
45764579
if (addr_type == ADDR_LOADED_BUFFERS
45774580
|| addr_type == ADDR_BUFFERS)
4578-
lnum = compute_buffer_local_count(addr_type, lnum, (i == '-') ? -1 * n : n);
4581+
lnum = compute_buffer_local_count(
4582+
addr_type, lnum, (i == '-') ? -1 * n : n);
45794583
else if (i == '-')
45804584
lnum -= n;
45814585
else
@@ -4662,7 +4666,8 @@ invalid_range(eap)
46624666
return (char_u *)_(e_invrange);
46634667
break;
46644668
case ADDR_ARGUMENTS:
4665-
if (eap->line2 > ARGCOUNT + (!ARGCOUNT)) // add 1 if ARCOUNT is 0
4669+
/* add 1 if ARGCOUNT is 0 */
4670+
if (eap->line2 > ARGCOUNT + (!ARGCOUNT))
46664671
return (char_u *)_(e_invrange);
46674672
break;
46684673
case ADDR_BUFFERS:

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+
617,
744746
/**/
745747
616,
746748
/**/

0 commit comments

Comments
 (0)