From 7161d6c1503eea13e7bde7ae17333b0f5ddf1aaa Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Tue, 2 Jun 2015 08:48:37 -0700 Subject: [PATCH] fixes crash from issue #119 Signed-off-by: Nikolaj Bjorner --- src/tactic/arith/card2bv_tactic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tactic/arith/card2bv_tactic.cpp b/src/tactic/arith/card2bv_tactic.cpp index 933b687b4..7c715e6e7 100644 --- a/src/tactic/arith/card2bv_tactic.cpp +++ b/src/tactic/arith/card2bv_tactic.cpp @@ -488,7 +488,7 @@ public: unsigned size = g->size(); expr_ref new_f1(m), new_f2(m); proof_ref new_pr1(m), new_pr2(m); - for (unsigned idx = 0; idx < size; idx++) { + for (unsigned idx = 0; !g->inconsistent() && idx < g->size(); idx++) { m_rw1(g->form(idx), new_f1, new_pr1); TRACE("card2bv", tout << "Rewriting " << mk_ismt2_pp(new_f1.get(), m) << std::endl;); m_rw2.rewrite(new_f1, new_f2);