Skip to content

Commit

Permalink
fix bug in stable sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Felix committed Dec 29, 2019
1 parent f14b50b commit 7a1a2c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vivify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,12 @@ struct vivify_flush_smaller {
bool operator () (Clause * a, Clause * b) const {

const auto eoa = a->end (), eob = b->end ();
auto i = a->begin ();
auto j = b->begin ();
for (auto i = a->begin (); i != eoa && j != eob; i++, j++)
for (; i != eoa && j != eob; i++, j++)
if (*i != *j) return *i < *j;

return j == eob;
return i != eoa && j == eob;
}
};

Expand Down

0 comments on commit 7a1a2c1

Please sign in to comment.