From 6b225ebe24e37dab7a407e07ddf1c110876ff751 Mon Sep 17 00:00:00 2001 From: ialex32x Date: Thu, 16 Jan 2025 15:47:50 +0800 Subject: [PATCH] Fix index check in MethodBind::get_argument_type --- core/object/method_bind.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/object/method_bind.h b/core/object/method_bind.h index e06eb1f8fae..a07824a0dca 100644 --- a/core/object/method_bind.h +++ b/core/object/method_bind.h @@ -90,7 +90,7 @@ public: } _FORCE_INLINE_ Variant::Type get_argument_type(int p_argument) const { - ERR_FAIL_COND_V(p_argument < -1 || p_argument > argument_count, Variant::NIL); + ERR_FAIL_COND_V(p_argument < -1 || p_argument >= argument_count, Variant::NIL); return argument_types[p_argument + 1]; }