From 9c5b284d724b991461ac9bbb2114853d32f6279c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 14 Apr 2022 14:04:26 +0200 Subject: [PATCH] - fixed bad color range check in ACS HudMessage code. --- src/playsim/p_acs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playsim/p_acs.cpp b/src/playsim/p_acs.cpp index 215fb0e34e..64e2aa112e 100644 --- a/src/playsim/p_acs.cpp +++ b/src/playsim/p_acs.cpp @@ -8757,7 +8757,7 @@ scriptwait: (type & HUDMSG_LAYER_MASK) >> HUDMSG_LAYER_SHIFT); if (type & HUDMSG_LOG) { - int consolecolor = color >= CR_BRICK && color <= CR_YELLOW ? color + 'A' : '-'; + int consolecolor = color >= CR_BRICK && color < NUM_TEXT_COLORS && color != CR_UNTRANSLATED ? color + 'A' : '-'; Printf(PRINT_NONOTIFY, "\n" TEXTCOLOR_ESCAPESTR "%c%s\n%s\n%s\n", consolecolor, console_bar, work.GetChars(), console_bar); } }