aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMax Horn2009-10-20 11:14:22 +0000
committerMax Horn2009-10-20 11:14:22 +0000
commit255349b262b3ad0d000fe2e9c573263fa40a5faa (patch)
treeb8534e14e0bd0d306d7f149e48d120d0c9d2c09d /engines/sci
parent86b81c8eb6f95530379c402ab228cccb79a94535 (diff)
downloadscummvm-rg350-255349b262b3ad0d000fe2e9c573263fa40a5faa.tar.gz
scummvm-rg350-255349b262b3ad0d000fe2e9c573263fa40a5faa.tar.bz2
scummvm-rg350-255349b262b3ad0d000fe2e9c573263fa40a5faa.zip
SCI: Fix for _vocab_add_rule (term was not being inited)
svn-id: r45263
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/grammar.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/sci/engine/grammar.cpp b/engines/sci/engine/grammar.cpp
index 4b519573cf..597b3fb483 100644
--- a/engines/sci/engine/grammar.cpp
+++ b/engines/sci/engine/grammar.cpp
@@ -255,16 +255,13 @@ void Vocabulary::freeRuleList(ParseRuleList *list) {
}
static ParseRuleList *_vocab_add_rule(ParseRuleList *list, ParseRule *rule) {
- int term;
-
- if (!rule)
return list;
ParseRuleList *new_elem = new ParseRuleList(rule);
if (list) {
-/* int term = new_elem->terminal;
- if (term < list->terminal) {
+ const int term = new_elem->terminal;
+/* if (term < list->terminal) {
new_elem->next = list;
return new_elem;
} else {*/