From 5565c75423474e352b24d7691b9e83887f236554 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Fri, 16 Dec 2022 19:41:26 -0800 Subject: [PATCH] Correctly log assertion failures --- flight.rdbg | Bin 1955 -> 1971 bytes gamestate.c | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/flight.rdbg b/flight.rdbg index 3d1162f1ea5c1b0da2be65443d68103760e13b0a..74c7381a8e6b7bde5ebeec655133fa576ed3442c 100644 GIT binary patch delta 70 zcmZ3?znOo-d{#z|$qQIR*qIp^7>ZJJHh*E2WCRKcvRh16U}NWE1PU{901227KOabl M4T#-xGSf3k03#0#R{#J2 delta 54 zcmdnYznFi+d{##G$qQIRHveXoWCSu3*{!)485kHCIe-L+>%<4*vH`JMPG)*W2>@sS B3o`%! diff --git a/gamestate.c b/gamestate.c index 3d1b4c8..3d2ea03 100644 --- a/gamestate.c +++ b/gamestate.c @@ -88,9 +88,8 @@ void __flight_assert(bool cond, const char *file, int line, const char *cond_str { #define MESSAGE_BUFFER_SIZE 2048 char message_buffer[MESSAGE_BUFFER_SIZE] = {0}; - Log("Assertion failure\n"); // so that I have the time in the logs for when the assertion failed. Too lazy to fill a time string here snprintf(message_buffer, MESSAGE_BUFFER_SIZE, "%s:%d | Assertion %s failed\n", file, line, cond_string); - fprintf(stderr, "%s", message_buffer); + Log("%s", message_buffer); if (log_file != NULL) { fprintf(log_file, "%s", message_buffer);