diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-10 18:21:30 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-10 18:21:30 +0200 |
commit | 87795939d01932b0d8155fd69c7494fa51c523f3 (patch) | |
tree | d41a1a378e1ca01826280ae1f6b420f9dc201c9e /src/userfunc.c | |
parent | 51e7e78de7320a734ddc2d7931e767bccaf7e6f2 (diff) | |
download | vim-git-87795939d01932b0d8155fd69c7494fa51c523f3.tar.gz |
patch 8.2.2746: check for duplicate arguments does not workv8.2.2746
Problem: Check for duplicate arguments does not work.
Solution: Correct condition.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |