Skip to content

Commit 2b34bd0

Browse files
committed
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.
1 parent 53b546e commit 2b34bd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/godot_cpp/core/method_bind.hpp

+1-1
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)