summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-04 20:35:39 +0100
committerGitHub <noreply@github.com>2021-03-04 20:35:39 +0100
commit86fba084278c8e751463c2f1c73e912de020239d (patch)
treeb45ef2135d0c07590273f2a1460e611a1c3c373b /core
parenta3dece960fc05a325b81467a87469b45348c4542 (diff)
parent6985967c3bbfbc96e60fdd5ec6136d209c3d5210 (diff)
Merge pull request #46669 from W4RH4WK/add-fail-check-variant-construct
Add missing ERR_FAIL_INDEX check to Variant::construct
Diffstat (limited to 'core')
-rw-r--r--core/variant/variant_construct.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp
index 52f9f6060e..f0c9e52b46 100644
--- a/core/variant/variant_construct.cpp
+++ b/core/variant/variant_construct.cpp
@@ -773,6 +773,7 @@ void Variant::_unregister_variant_constructors() {
}
void Variant::construct(Variant::Type p_type, Variant &base, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
+ ERR_FAIL_INDEX(p_type, Variant::VARIANT_MAX);
uint32_t s = construct_data[p_type].size();
for (uint32_t i = 0; i < s; i++) {
int argc = construct_data[p_type][i].argument_count;