diff --git a/src/math/lp/horner.cpp b/src/math/lp/horner.cpp index d96e87dd6..dda8efb6a 100644 --- a/src/math/lp/horner.cpp +++ b/src/math/lp/horner.cpp @@ -166,7 +166,8 @@ nex horner::split_with_var(const nex& e, lpvar j) { a.type() = expr_type::SUM; if (b.children().size() == 1) { - b = b.children()[0]; + nex t = b.children()[0]; + b = t; } else if (b.children().size() > 1) { b.type() = expr_type::SUM; }