0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.2746: check for duplicate arguments does not work

Problem:    Check for duplicate arguments does not work.
Solution:   Correct condition.
This commit is contained in:
Bram Moolenaar
2021-04-10 18:21:30 +02:00
parent 51e7e78de7
commit 87795939d0
2 changed files with 3 additions and 1 deletions

View File

@@ -109,7 +109,7 @@ one_function_arg(
return arg; return arg;
} }
is_underscore = arg_copy[0] == '_' && arg_copy[1] == NUL; is_underscore = arg_copy[0] == '_' && arg_copy[1] == NUL;
if (argtypes != NULL && !is_underscore) if (argtypes == NULL || !is_underscore)
// Check for duplicate argument name. // Check for duplicate argument name.
for (i = 0; i < newargs->ga_len; ++i) for (i = 0; i < newargs->ga_len; ++i)
if (STRCMP(((char_u **)(newargs->ga_data))[i], arg_copy) == 0) if (STRCMP(((char_u **)(newargs->ga_data))[i], arg_copy) == 0)

View File

@@ -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 */
/**/
2746,
/**/ /**/
2745, 2745,
/**/ /**/