Skip to content

Commit 6d939e6

Browse files
authored
Merge pull request #1509 from YuriSizov/method-bind-is-off-by-one
Fix argument metadata when binding methods
2 parents 99926d8 + 2b34bd0 commit 6d939e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/godot_cpp/core/method_bind.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class MethodBind {
132132
std::vector<GDExtensionClassMethodArgumentMetadata> vec;
133133
// First element is return value
134134
vec.reserve(argument_count + 1);
135-
for (int i = 0; i < argument_count; i++) {
135+
for (int i = 0; i < argument_count + 1; i++) {
136136
vec.push_back(get_argument_metadata(i - 1));
137137
}
138138
return vec;

0 commit comments

Comments
 (0)