]> granicus.if.org Git - vim/commitdiff
patch 8.2.2746: check for duplicate arguments does not work v8.2.2746
authorBram Moolenaar <Bram@vim.org>
Sat, 10 Apr 2021 16:21:30 +0000 (18:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 10 Apr 2021 16:21:30 +0000 (18:21 +0200)
Problem:    Check for duplicate arguments does not work.
Solution:   Correct condition.

src/userfunc.c
src/version.c

index 018542681afb162b0167a8f397486acf94d10b0a..5221126076b1380dc71f70cb5b0bb21131d6d26c 100644 (file)
@@ -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)
index 346b5d1f0d1d1d64db7992ab6e296930f4a74ae4..bbbc92abbbf0b65afcb0f62384d0936d843b218b 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2746,
 /**/
     2745,
 /**/