- 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.
This commit is contained in:
Christoph Oelckers 2019-02-15 08:52:56 +01:00 committed by drfrag
parent 18253b5203
commit e27efa5a2e

View file

@ -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