aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-10-20 19:10:51 +0000
committerMax Horn2009-10-20 19:10:51 +0000
commit4f69e0a753fe22236e88c3cbebcf910d41f90a27 (patch)
tree1982effe5d41ad686cb95f01477f80ec5fd01aee
parent1e1172af499dd995651e3f8a80d8af291f0f177d (diff)
downloadscummvm-rg350-4f69e0a753fe22236e88c3cbebcf910d41f90a27.tar.gz
scummvm-rg350-4f69e0a753fe22236e88c3cbebcf910d41f90a27.tar.bz2
scummvm-rg350-4f69e0a753fe22236e88c3cbebcf910d41f90a27.zip
SCI: Fix for _vocab_free_empty_rule_list
svn-id: r45278
-rw-r--r--engines/sci/engine/grammar.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/engine/grammar.cpp b/engines/sci/engine/grammar.cpp
index 3860f0600a..8c6c93e583 100644
--- a/engines/sci/engine/grammar.cpp
+++ b/engines/sci/engine/grammar.cpp
@@ -51,6 +51,7 @@ struct ParseRule {
Common::Array<int> _data; /**< actual data */
~ParseRule() {
+ assert(_allocd_rules > 0);
--_allocd_rules;
}
@@ -315,6 +316,7 @@ static void _vocab_free_empty_rule_list(ParseRuleList *list) {
if (list->next)
_vocab_free_empty_rule_list(list->next);
list->next = 0;
+ list->rule = 0;
delete list;
}