summaryrefslogtreecommitdiff
path: root/core/variant_call.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r--core/variant_call.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index a2794e7052..81e823b5db 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -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;