소스 검색

Don't ignore the type mismatch in setter function

Bartłomiej T. Listwon 3 년 전
부모
커밋
5a7bd296af
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      modules/gdscript/gdscript.cpp

+ 2 - 0
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)) {