Skip to content

Commit 80aec18

Browse files
YuriSizovdsnopek
authored andcommitted
Fix argument metadata when binding methods
While there doesn't seem to be any runtime issues, this triggers the address sanitizer in a few ways, depending on what kind of method you're binding. (cherry picked from commit 2b34bd0)
1 parent 18c31e3 commit 80aec18

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)