mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch: 7.4.1075
Problem: Crash when using an invalid command.
Solution: Fix generating the error message. (Dominique Pelle)
05fe017c1a
This commit is contained in:
parent
2adb8acebd
commit
7209d3c59a
@ -5503,7 +5503,8 @@ int parse_addr_type_arg(char_u *value, int vallen, uint32_t *argt,
|
||||
int *addr_type_arg)
|
||||
{
|
||||
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;
|
||||
b = STRNCMP(value, addr_type_complete[i].name, vallen) == 0;
|
||||
if (a && b) {
|
||||
@ -5514,8 +5515,8 @@ int parse_addr_type_arg(char_u *value, int vallen, uint32_t *argt,
|
||||
|
||||
if (addr_type_complete[i].expand == -1) {
|
||||
char_u *err = value;
|
||||
for (i = 0; err[i] == NUL || !ascii_iswhite(err[i]); i++)
|
||||
;
|
||||
|
||||
for (i = 0; err[i] != NUL && !ascii_iswhite(err[i]); i++) {}
|
||||
err[i] = NUL;
|
||||
EMSG2(_("E180: Invalid address type value: %s"), err);
|
||||
return FAIL;
|
||||
|
@ -602,8 +602,8 @@ static int included_patches[] = {
|
||||
// 1078 NA
|
||||
// 1077 NA
|
||||
1076,
|
||||
// 1075,
|
||||
// 1074 NA
|
||||
1075,
|
||||
// 1074 NA,
|
||||
// 1073,
|
||||
1072,
|
||||
// 1071,
|
||||
|
Loading…
Reference in New Issue
Block a user