Merge pull request #1509 from YuriSizov/method-bind-is-off-by-one

Fix argument metadata when binding methods
pull/1519/head
David Snopek 2024-07-06 11:42:45 -05:00 committed by GitHub
commit 6d939e6878
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ public:
std::vector<GDExtensionClassMethodArgumentMetadata> vec; std::vector<GDExtensionClassMethodArgumentMetadata> vec;
// First element is return value // First element is return value
vec.reserve(argument_count + 1); 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)); vec.push_back(get_argument_metadata(i - 1));
} }
return vec; return vec;