diff options
author | Max Horn | 2009-10-20 19:10:51 +0000 |
---|---|---|
committer | Max Horn | 2009-10-20 19:10:51 +0000 |
commit | 4f69e0a753fe22236e88c3cbebcf910d41f90a27 (patch) | |
tree | 1982effe5d41ad686cb95f01477f80ec5fd01aee /engines/sci | |
parent | 1e1172af499dd995651e3f8a80d8af291f0f177d (diff) | |
download | scummvm-rg350-4f69e0a753fe22236e88c3cbebcf910d41f90a27.tar.gz scummvm-rg350-4f69e0a753fe22236e88c3cbebcf910d41f90a27.tar.bz2 scummvm-rg350-4f69e0a753fe22236e88c3cbebcf910d41f90a27.zip |
SCI: Fix for _vocab_free_empty_rule_list
svn-id: r45278
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/grammar.cpp | 2 |
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; } |