aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-10-14 21:11:52 +0200
committerEugene Sandulenko2019-10-14 21:11:52 +0200
commite5caf79c6a39b06b37ea7486cd9989418c9b49ce (patch)
tree0bb7903e3df98fcd3bba6620520cef4705428c88
parentbe95a7a2dde60aa642dbf245f2f52f42610932d3 (diff)
downloadscummvm-rg350-e5caf79c6a39b06b37ea7486cd9989418c9b49ce.tar.gz
scummvm-rg350-e5caf79c6a39b06b37ea7486cd9989418c9b49ce.tar.bz2
scummvm-rg350-e5caf79c6a39b06b37ea7486cd9989418c9b49ce.zip
GUI: Fix crash with attempt to switch to Greek or Hebrew
These languages have 2 charater codes, and setting third character in the Common::String led to assert. The proper consturctor is used instead now.
-rw-r--r--gui/options.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 22202b55e2..073d04b0a9 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2158,8 +2158,7 @@ void GlobalOptionsDialog::apply() {
if (newLang == "C")
ttsMan->setLanguage("en");
else {
- Common::String guiLang = newLang;
- guiLang.setChar('\0', 2);
+ Common::String guiLang(newLang.c_str(), 2);
ttsMan->setLanguage(guiLang);
}
_ttsVoiceSelectionPopUp->setSelectedTag(0);