summaryrefslogtreecommitdiff
path: root/src/expr/command.cpp
diff options
context:
space:
mode:
authorKshitij Bansal <kshitij@cs.nyu.edu>2012-11-27 21:31:46 +0000
committerKshitij Bansal <kshitij@cs.nyu.edu>2012-11-27 21:31:46 +0000
commit551d1d37fe9c8ec25ddeac1e37b68d39158378ea (patch)
tree5507dd24bfb94349bdaf6ad9afb7dd5c44d3455c /src/expr/command.cpp
parent49da3204bbb10fbcd87923428f3b476ba5b57af6 (diff)
fix in CommandSequence invoke : maintain success/failure. Fixes bug 465.
(this commit was certified error- and warning-free by the test-and-commit script.)
Diffstat (limited to 'src/expr/command.cpp')
-rw-r--r--src/expr/command.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/expr/command.cpp b/src/expr/command.cpp
index 8ded902b7..fa2a8d1f2 100644
--- a/src/expr/command.cpp
+++ b/src/expr/command.cpp
@@ -407,8 +407,16 @@ void CommandSequence::invoke(SmtEngine* smtEngine) throw() {
void CommandSequence::invoke(SmtEngine* smtEngine, std::ostream& out) throw() {
for(; d_index < d_commandSequence.size(); ++d_index) {
d_commandSequence[d_index]->invoke(smtEngine, out);
+ if(! d_commandSequence[d_index]->ok()) {
+ // abort execution
+ d_commandStatus = d_commandSequence[d_index]->getCommandStatus();
+ return;
+ }
delete d_commandSequence[d_index];
}
+
+ AlwaysAssert(d_commandStatus == NULL);
+ d_commandStatus = CommandSuccess::instance();
}
CommandSequence::const_iterator CommandSequence::begin() const throw() {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback