From 3ef7c6d15e9f5f2fb7138a00aae2993134a8d072 Mon Sep 17 00:00:00 2001 From: Arceveti Date: Sun, 24 Jul 2022 00:52:55 -0700 Subject: [PATCH] Add escape for '@' in crash_screen_print --- src/game/crash_screen.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/crash_screen.c b/src/game/crash_screen.c index c4ce3e8d7..1ae97e420 100644 --- a/src/game/crash_screen.c +++ b/src/game/crash_screen.c @@ -330,13 +330,18 @@ void crash_screen_print(s32 x, s32 y, const char *fmt, ...) { RGBA16 color = COLOR_RGBA16_WHITE; + s8 escape = FALSE; + if (size > 0) { char *ptr = buf; while (*ptr) { glyph = (*ptr & 0x7f); - if (glyph == '@') { + if (glyph == '\\' && *(ptr + 1) && (*(ptr + 1) & 0x7f) == '@') { // use '\\@' to print '@' + ptr++; + escape = TRUE; + } else if (glyph == '@' && !escape) { ptr++; if (!*ptr) { break; @@ -360,6 +365,8 @@ void crash_screen_print(s32 x, s32 y, const char *fmt, ...) { color = GPACK_RGBA5551(rgba[0], rgba[1], rgba[2], rgba[3]); } else { + escape = FALSE; + if (glyph != 0xff) { crash_screen_draw_glyph(x, y, glyph, color); }