Skip to content

Commit 331a215

Browse files
committed
Fix i18n char encoding error in HUD messages.
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.
1 parent e33651a commit 331a215

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tsc/src/gui/hud.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ void cHud::Set_World_Name(std::string name)
399399

400400
void cHud::Set_Text(std::string message)
401401
{
402-
mp_message_text->setText(message);
402+
mp_message_text->setText(reinterpret_cast<const CEGUI::utf8*>(message.c_str())); // Caller has to translate it
403403
mp_message_text->show();
404404
m_text_counter = TEXT_DISPLAY_TIME;
405405
}

0 commit comments

Comments
 (0)