From 4f69e0a753fe22236e88c3cbebcf910d41f90a27 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 20 Oct 2009 19:10:51 +0000 Subject: SCI: Fix for _vocab_free_empty_rule_list svn-id: r45278 --- engines/sci/engine/grammar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/sci') 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 _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; } -- cgit v1.2.3