mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
avoid using not initialized variables in theory_lra
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
67a2a26009
commit
8068c64cab
2 changed files with 4 additions and 2 deletions
|
@ -1465,10 +1465,12 @@ public:
|
|||
if (!m_has_int) {
|
||||
return true;
|
||||
}
|
||||
unsigned nv = th.get_num_vars();
|
||||
unsigned nv = std::min(th.get_num_vars(), m_theory_var2var_index.size());
|
||||
bool all_bounded = true;
|
||||
for (unsigned v = 0; v < nv; ++v) {
|
||||
lp::var_index vi = m_theory_var2var_index[v];
|
||||
if (vi == UINT_MAX)
|
||||
continue;
|
||||
if (!m_solver->is_term(vi) && !var_has_bound(vi, true) && !var_has_bound(vi, false)) {
|
||||
lp::lar_term term;
|
||||
term.add_monomial(rational::one(), vi);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue