0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -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;
}
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)