3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-02 19:56:54 +00:00

Fix true positive critical bugs from static analysis discussion #8764

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-25 00:41:59 +00:00
parent 4a29c77aa2
commit ae4cb5557a
4 changed files with 9 additions and 3 deletions

View file

@ -834,7 +834,7 @@ namespace pb {
}
void solver::ineq::divide(unsigned c) {
if (c == 1) return;
if (c <= 1) return;
for (unsigned i = size(); i-- > 0; ) {
m_wlits[i].first = (coeff(i) + c - 1) / c;
}
@ -857,7 +857,7 @@ namespace pb {
*/
void solver::round_to_one(ineq& ineq, bool_var v) {
unsigned c = ineq.bv_coeff(v);
if (c == 1) return;
if (c <= 1) return;
unsigned sz = ineq.size();
for (unsigned i = 0; i < sz; ++i) {
unsigned ci = ineq.coeff(i);