aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2014-10-15 19:44:03 +0300
committerFilippos Karapetis2014-10-15 19:44:03 +0300
commit740d1620f20511449c492190fa6432bb85439cc9 (patch)
treeb729932b8ba871576d3990b0575161f67ef2e903 /engines
parente6d1337e115d4a49d9103e33b1e75133d237e090 (diff)
downloadscummvm-rg350-740d1620f20511449c492190fa6432bb85439cc9.tar.gz
scummvm-rg350-740d1620f20511449c492190fa6432bb85439cc9.tar.bz2
scummvm-rg350-740d1620f20511449c492190fa6432bb85439cc9.zip
SCI: Simplify check for non-alphanumeric characters in the parser
This is also for bug #6608. Many thanks to wjp for his help with this
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/parser/vocabulary.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index 7fc02dc9a0..000b037b44 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -535,10 +535,7 @@ bool Vocabulary::tokenizeString(ResultWordListList &retval, const char *sentence
if (Common::isAlnum(c) || (c == '-' && wordLen) || (c >= 0x80)) {
currentWord[wordLen] = lowerCaseMap[c];
++wordLen;
- } else if (!Common::isAlpha(c) && c != '-' && c != ' ' && c != '\0' && (g_sci->getLanguage() != Common::JA_JPN)) {
- // Skip non-alphanumeric characters in the string.
- // Note: hyphens ('-'), spaces and string terminators are handled in the other branches.
- } else {
+ } else if (c == ' ' || c == '\0') {
// Continue on this word. Words may contain a '-', but may not start with
// one.