diff --git a/src/smt/theory_wmaxsat.cpp b/src/smt/theory_wmaxsat.cpp index 0c9e64e93..9ed944d2c 100644 --- a/src/smt/theory_wmaxsat.cpp +++ b/src/smt/theory_wmaxsat.cpp @@ -55,9 +55,8 @@ void theory_wmaxsat::get_assignment(svector& result) { } else { std::sort(m_cost_save.begin(), m_cost_save.end()); - unsigned j = 0; - for (theory_var i = 0; i < m_vars.size(); ++i) { - if (j < m_cost_save.size() && m_cost_save[j] == i) { + for (unsigned i = 0,j = 0; i < m_vars.size(); ++i) { + if (j < m_cost_save.size() && m_cost_save[j] == static_cast(i)) { result.push_back(false); ++j; }