diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app/app.cpp | 13 | ||||
-rw-r--r-- | src/graphics/engine/text.cpp | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp index 118e100..27adcb1 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -312,11 +312,14 @@ bool CApplication::Create() break; } - std::string langStr = "LANGUAGE="; - langStr += locale; - strcpy(S_LANGUAGE, langStr.c_str()); - putenv(S_LANGUAGE); - setlocale(LC_ALL, locale.c_str()); + if (!locale.empty()) + { + std::string langStr = "LANG="; + langStr += locale; + strcpy(S_LANGUAGE, langStr.c_str()); + putenv(S_LANGUAGE); + } + setlocale(LC_ALL, ""); GetLogger()->Debug("Set locale to '%s'\n", locale.c_str()); bindtextdomain("colobot", COLOBOT_I18N_DIR); diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 66c73a9..101e01a 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -677,7 +677,7 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::P return; int width = 1; - if (ch.c1 < 32) { // FIXME add support for chars with code 9 10 23 + if (ch.c1 > 0 && ch.c1 < 32) { // FIXME add support for chars with code 9 10 23 ch.c1 = ' '; ch.c2 = 0; ch.c3 = 0; |