Skip to content

Commit

Permalink
patch 8.2.2746: check for duplicate arguments does not work
Browse files Browse the repository at this point in the history
Problem:    Check for duplicate arguments does not work.
Solution:   Correct condition.
  • Loading branch information
brammool committed Apr 10, 2021
1 parent 51e7e78 commit 8779593
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/userfunc.c
Expand Up @@ -109,7 +109,7 @@ one_function_arg(
return arg;
}
is_underscore = arg_copy[0] == '_' && arg_copy[1] == NUL;
if (argtypes != NULL && !is_underscore)
if (argtypes == NULL || !is_underscore)
// Check for duplicate argument name.
for (i = 0; i < newargs->ga_len; ++i)
if (STRCMP(((char_u **)(newargs->ga_data))[i], arg_copy) == 0)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2746,
/**/
2745,
/**/
Expand Down

0 comments on commit 8779593

Please sign in to comment.