Skip to content

Commit aa0f5db

Browse files
committed
fixes
Signed-off-by: Lev Nachmanson <[email protected]>
1 parent f8037ff commit aa0f5db

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/math/lp/lar_solver.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,8 +1774,13 @@ void lar_solver::add_row_from_term_no_constraint(const lar_term * term, unsigned
17741774
m_mpq_lar_core_solver.m_r_solver.update_x(j, get_basic_var_value_from_row(A_r().row_count() - 1));
17751775
if (use_lu())
17761776
fill_last_row_of_A_d(A_d(), term);
1777-
for (const auto & c : *term)
1778-
m_usage_in_terms[c.column()] = m_usage_in_terms[c.column()] + 1;
1777+
for (const auto & c : *term) {
1778+
unsigned j = c.column();
1779+
while (m_usage_in_terms.size() <= j) {
1780+
m_usage_in_terms.push_back(0);
1781+
}
1782+
m_usage_in_terms[j] = m_usage_in_terms[j] + 1;
1783+
}
17791784

17801785
}
17811786

0 commit comments

Comments
 (0)