summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2024-07-06 11:42:45 -0500
committerGitHub <noreply@github.com>2024-07-06 11:42:45 -0500
commit6d939e6878c3fb14ae521207ad2d2f0267fd0a9b (patch)
tree5d20bdff8e092cc417200ed59576f0ce827e4b24 /include
parent99926d8e2027f6bfdc66e341a1c735b20eda61e4 (diff)
parent2b34bd0d8b16d471803660b2de0f258c0d6cfe7d (diff)
downloadredot-cpp-6d939e6878c3fb14ae521207ad2d2f0267fd0a9b.tar.gz
Merge pull request #1509 from YuriSizov/method-bind-is-off-by-one
Fix argument metadata when binding methods
Diffstat (limited to 'include')
-rw-r--r--include/godot_cpp/core/method_bind.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/godot_cpp/core/method_bind.hpp b/include/godot_cpp/core/method_bind.hpp
index eabd6ec..f2da66c 100644
--- a/include/godot_cpp/core/method_bind.hpp
+++ b/include/godot_cpp/core/method_bind.hpp
@@ -132,7 +132,7 @@ public:
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;