summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnacio Etcheverry <neikeq@users.noreply.github.com>2018-02-24 20:06:41 +0100
committerGitHub <noreply@github.com>2018-02-24 20:06:41 +0100
commit71602c7491552baafd169e5e3cab9ff97a968951 (patch)
tree1b2a45c0c4f5c40f845bc506c0cd8208f6ce9373
parentd356bd605bd651b455bca36f336e8d75948e461f (diff)
parent0c828581218b1f4694d4a6988b98ee2378163739 (diff)
Merge pull request #16986 from neikeq/issue-16983
Mono: Fix bindings for parameters in vararg methods
-rw-r--r--modules/mono/editor/bindings_generator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 952e033565..7e92296554 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -1528,9 +1528,9 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte
if (p_imethod.is_vararg) {
if (i < p_imethod.arguments.size() - 1) {
c_in_statements += sformat(arg_type->c_in.size() ? arg_type->c_in : TypeInterface::DEFAULT_VARARG_C_IN, "Variant", c_param_name);
- c_in_statements += "\t" C_LOCAL_PTRCALL_ARGS ".set(0, ";
- c_in_statements += sformat("&%s_in", c_param_name);
- c_in_statements += ");\n";
+ c_in_statements += "\t" C_LOCAL_PTRCALL_ARGS ".set(";
+ c_in_statements += itos(i);
+ c_in_statements += sformat(", &%s_in);\n", c_param_name);
}
} else {
if (i > 0)