aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/parser
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/parser')
-rw-r--r--engines/sci/parser/vocabulary.cpp7
-rw-r--r--engines/sci/parser/vocabulary.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index e48a9cdfda..7b115a815d 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -142,10 +142,13 @@ bool Vocabulary::loadParserWords() {
const char *Vocabulary::getAnyWordFromGroup(int group) {
if (group == VOCAB_MAGIC_NUMBER_GROUP)
return "{number}";
+ if (group == VOCAB_MAGIC_NOTHING_GROUP)
+ return "{nothing}";
- for (WordMap::const_iterator i = _parserWords.begin(); i != _parserWords.end(); ++i)
+ for (WordMap::const_iterator i = _parserWords.begin(); i != _parserWords.end(); ++i) {
if (i->_value._group == group)
return i->_key.c_str();
+ }
return "{invalid}";
}
@@ -301,7 +304,7 @@ ResultWord Vocabulary::lookupWord(const char *word, int word_len) {
}
void Vocabulary::decipherSaidBlock(byte *addr) {
- byte nextitem;
+ uint16 nextitem;
do {
nextitem = *addr++;
diff --git a/engines/sci/parser/vocabulary.h b/engines/sci/parser/vocabulary.h
index dccef0f5f3..3317b6dfba 100644
--- a/engines/sci/parser/vocabulary.h
+++ b/engines/sci/parser/vocabulary.h
@@ -78,6 +78,7 @@ enum {
/* This word class is used for numbers */
#define VOCAB_MAGIC_NUMBER_GROUP 0xffd /* 0xffe ? */
+#define VOCAB_MAGIC_NOTHING_GROUP 0xffe
/* Number of nodes for each parse_tree_node structure */
#define VOCAB_TREE_NODES 500