Skip to content

Commit

Permalink
Fix i18n char encoding error in HUD messages.
Browse files Browse the repository at this point in the history
The strings handed to cHud::Set_Text() are already UTF-8 and
translated. CEGUI needs to be told about that by casting to
CEGUI::utf8* explicitely.
  • Loading branch information
Quintus committed Apr 26, 2020
1 parent e33651a commit 331a215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsc/src/gui/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ void cHud::Set_World_Name(std::string name)

void cHud::Set_Text(std::string message)
{
mp_message_text->setText(message);
mp_message_text->setText(reinterpret_cast<const CEGUI::utf8*>(message.c_str())); // Caller has to translate it
mp_message_text->show();
m_text_counter = TEXT_DISPLAY_TIME;
}
Expand Down

0 comments on commit 331a215

Please sign in to comment.