diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-04 20:35:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 20:35:39 +0100 |
commit | 86fba084278c8e751463c2f1c73e912de020239d (patch) | |
tree | b45ef2135d0c07590273f2a1460e611a1c3c373b /core | |
parent | a3dece960fc05a325b81467a87469b45348c4542 (diff) | |
parent | 6985967c3bbfbc96e60fdd5ec6136d209c3d5210 (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.cpp | 1 |
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; |