From 0c7a32d332d352544d797f3909604f49c6ba40b8 Mon Sep 17 00:00:00 2001 From: Sergey Lapin Date: Thu, 6 Apr 2023 19:35:47 +0300 Subject: [PATCH] Asserts work in debug builds --- modules/gdscript/gdscript_function.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index d58164ffa9..9bd955452d 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -28,6 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#include +#include + #include "gdscript_function.h" #include "core/os/os.h" @@ -1550,6 +1553,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a _err_print_error(err_func.utf8().get_data(), err_file.utf8().get_data(), err_line, err_text.utf8().get_data(), ERR_HANDLER_SCRIPT); } +#ifndef TOOLS_ENABLED + fprintf(stderr, "ASSERT failed: %ls\n", err_text.c_str()); + abort(); +#endif #endif OPCODE_OUT; } -- 2.34.1