fix VariantCall default parameter ordering
This commit is contained in:
parent
548bd4ef1d
commit
96706168d0
1 changed files with 3 additions and 2 deletions
|
@ -101,9 +101,10 @@ struct _VariantCall {
|
|||
const Variant *newargs[VARIANT_ARG_MAX];
|
||||
for (int i = 0; i < p_argcount; i++)
|
||||
newargs[i] = p_args[i];
|
||||
int defargcount = def_argcount;
|
||||
// fill in any remaining parameters with defaults
|
||||
int first_default_arg = arg_count - def_argcount;
|
||||
for (int i = p_argcount; i < arg_count; i++)
|
||||
newargs[i] = &default_args[defargcount - (i - p_argcount) - 1]; //default arguments
|
||||
newargs[i] = &default_args[i - first_default_arg];
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (!verify_arguments(newargs, r_error))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue