From 221a2a17422dfbb7e0be5ca42fe56b91adb656e3 Mon Sep 17 00:00:00 2001 From: reduz Date: Mon, 9 Nov 2020 00:19:09 -0300 Subject: Refactored variant constructor logic --- core/variant/array.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/variant/array.cpp') diff --git a/core/variant/array.cpp b/core/variant/array.cpp index 64e31189de..04ee47efff 100644 --- a/core/variant/array.cpp +++ b/core/variant/array.cpp @@ -165,7 +165,7 @@ void Array::_assign(const Array &p_array) { } else if (Variant::can_convert_strict(src_val.get_type(), _p->typed.type)) { Variant *ptr = &src_val; Callable::CallError ce; - new_array.write[i] = Variant::construct(_p->typed.type, (const Variant **)&ptr, 1, ce, true); + Variant::construct(_p->typed.type, new_array.write[i], (const Variant **)&ptr, 1, ce); if (ce.error != Callable::CallError::CALL_OK) { ERR_FAIL_MSG("Unable to convert array index " + itos(i) + " from '" + Variant::get_type_name(src_val.get_type()) + "' to '" + Variant::get_type_name(_p->typed.type) + "'."); } -- cgit v1.2.3