aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kstring.cpp10
-rw-r--r--engines/sci/engine/scriptdebug.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index bf03e79360..e15315397e 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -253,13 +253,13 @@ reg_t kParse(EngineState *s, int funct_nr, int argc, reg_t *argv) {
return s->r_acc;
}
- words = vocab_tokenize_string(string,
- s->parser_words, s->parser_words_nr,
- s->_parserSuffixes,
- &error);
+ int res = vocab_tokenize_string(words, string,
+ s->parser_words, s->parser_words_nr,
+ s->_parserSuffixes,
+ &error);
s->parser_valid = 0; /* not valid */
- if (!words.empty()) {
+ if (res == 0 && !words.empty()) {
int syntax_fail = 0;
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 35fc41fb31..1117d2aca2 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -1032,9 +1032,9 @@ int c_parse(EngineState *s) {
string = cmd_params[0].str;
sciprintf("Parsing '%s'\n", string);
- words = vocab_tokenize_string(string, s->parser_words, s->parser_words_nr,
- s->_parserSuffixes, &error);
- if (!words.empty()) {
+ int res = vocab_tokenize_string(words, string, s->parser_words, s->parser_words_nr,
+ s->_parserSuffixes, &error);
+ if (res == 0&& !words.empty()) {
int syntax_fail = 0;
vocab_synonymize_tokens(words, s->_synonyms);