From: Bram Moolenaar Date: Sat, 10 Apr 2021 16:21:30 +0000 (+0200) Subject: patch 8.2.2746: check for duplicate arguments does not work X-Git-Tag: v8.2.2746 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87795939d01932b0d8155fd69c7494fa51c523f3;p=vim patch 8.2.2746: check for duplicate arguments does not work Problem: Check for duplicate arguments does not work. Solution: Correct condition. --- diff --git a/src/userfunc.c b/src/userfunc.c index 018542681..522112607 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -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) diff --git a/src/version.c b/src/version.c index 346b5d1f0..bbbc92abb 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2746, /**/ 2745, /**/