From f29ea80fb3e238278a721d79077c9087bccbac0b Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 9 Mar 2012 21:00:51 +0000 Subject: [PATCH] fix a "lost command" bug and associated memory leak in SMT-LIBv1 parser due to an out-of-place parenthesis --- src/parser/smt/Smt.g | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser/smt/Smt.g b/src/parser/smt/Smt.g index 083bdf3b5..932d9be78 100644 --- a/src/parser/smt/Smt.g +++ b/src/parser/smt/Smt.g @@ -193,8 +193,8 @@ benchAttribute returns [CVC4::Command* smt_command = NULL] | STATUS_TOK status[b_status] { smt_command = new SetBenchmarkStatusCommand(b_status); } | EXTRAFUNS_TOK LPAREN_TOK - ( { smt_command = new CommandSequence(); } - functionDeclaration[c] + { smt_command = new CommandSequence(); } + ( functionDeclaration[c] { ((CommandSequence*) smt_command)->addCommand(c); } )+ RPAREN_TOK | EXTRAPREDS_TOK LPAREN_TOK -- 2.30.2