From 5a7bd296af51b4d183a0a86cee3c040cade5be8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20T=2E=20Listwon?= Date: Fri, 22 Oct 2021 12:43:13 +0200 Subject: [PATCH] Don't ignore the type mismatch in setter function --- modules/gdscript/gdscript.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index c07893764f0..99225d6a819 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -961,6 +961,8 @@ bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) { call(member->setter, &val, 1, err); if (err.error == Variant::CallError::CALL_OK) { return true; //function exists, call was successful + } else { + return false; } } else { if (!member->data_type.is_type(p_value)) {