From e27efa5a2ecbe39be434b0299e8bafd56e6d220e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 15 Feb 2019 08:52:56 +0100 Subject: [PATCH] - fixed DHudMessageTypeOnFadeOut's character counter to be UTF-8 compatible. This was reading the string by byte and not by character and could end up printing incomplete UTF-8 data. --- src/g_shared/hudmessages.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/g_shared/hudmessages.cpp b/src/g_shared/hudmessages.cpp index 5e5274549..23ccf9d9e 100644 --- a/src/g_shared/hudmessages.cpp +++ b/src/g_shared/hudmessages.cpp @@ -787,7 +787,8 @@ bool DHUDMessageTypeOnFadeOut::Tick () if (State == 3 && --step >= 0) { linedrawcount++; - if (text[linevis++] == TEXTCOLOR_ESCAPE) + + if (text.GetNextCharacter(linevis) == TEXTCOLOR_ESCAPE) { if (text[linevis] == '[') { // named color