Skip to content

Commit

Permalink
Merge pull request godotengine#1509 from YuriSizov/method-bind-is-off…
Browse files Browse the repository at this point in the history
…-by-one

Fix argument metadata when binding methods
  • Loading branch information
dsnopek authored Jul 6, 2024
2 parents 99926d8 + 2b34bd0 commit 6d939e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/godot_cpp/core/method_bind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class MethodBind {
std::vector<GDExtensionClassMethodArgumentMetadata> vec;
// First element is return value
vec.reserve(argument_count + 1);
for (int i = 0; i < argument_count; i++) {
for (int i = 0; i < argument_count + 1; i++) {
vec.push_back(get_argument_metadata(i - 1));
}
return vec;
Expand Down

0 comments on commit 6d939e6

Please sign in to comment.