- 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
parent 340d7bce8d
commit c49665684b

View file

@ -771,7 +771,8 @@ bool DHUDMessageTypeOnFadeOut::Tick ()
if (State == 3 && --step >= 0) if (State == 3 && --step >= 0)
{ {
linedrawcount++; linedrawcount++;
if (text[linevis++] == TEXTCOLOR_ESCAPE)
if (text.GetNextCharacter(linevis) == TEXTCOLOR_ESCAPE)
{ {
if (text[linevis] == '[') if (text[linevis] == '[')
{ // named color { // named color