diff options
-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; } |