diff options
| author | Ignacio Etcheverry | 2018-02-24 20:03:16 +0100 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-02-26 23:54:32 +0100 |
| commit | c0386f0124e1e14f8c9d84deb0ffbf79011c40d7 (patch) | |
| tree | e3a0bb69d70bb66bd392422fc40ca912f4064c7c /modules/mono/editor/bindings_generator.cpp | |
| parent | b6f958965be2024b1618aa96e6e5d3c772cab6cc (diff) | |
| download | godot-c0386f0124e1e14f8c9d84deb0ffbf79011c40d7.tar.gz godot-c0386f0124e1e14f8c9d84deb0ffbf79011c40d7.tar.zst godot-c0386f0124e1e14f8c9d84deb0ffbf79011c40d7.zip | |
Mono: Fix bindings for parameters in vararg methods
(cherry picked from commit 0c828581218b1f4694d4a6988b98ee2378163739)
Diffstat (limited to '')
| -rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 872d40eb0..315c1e2f1 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -1560,9 +1560,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) |
