diff options
Diffstat (limited to 'engines/wintermute/utils')
-rw-r--r-- | engines/wintermute/utils/string_util.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/wintermute/utils/string_util.cpp b/engines/wintermute/utils/string_util.cpp index 7b3b0e1297..02946dbb2d 100644 --- a/engines/wintermute/utils/string_util.cpp +++ b/engines/wintermute/utils/string_util.cpp @@ -213,8 +213,10 @@ int StringUtil::indexOf(const WideString &str, const WideString &toFind, size_t } Common::String StringUtil::encodeSetting(const Common::String &str) { - if (str.contains('=')) { - error("Setting contains '='"); + for (int i = 0; i < str.size(); i++) { + if ((str[i] < 33) || (str[i] == '=') || (str[i] > 126)) { + error("Setting contains illegal characters: %s", str.c_str()); + } } return str; } |