From 113e7001e03ec7d1c2b79e0bb2cc9b762519bc22 Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Wed, 1 Aug 2018 16:08:47 -0700 Subject: [PATCH] Fix wrong evaluation of STRING_STOI (#2252) --- src/theory/evaluator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/theory/evaluator.cpp b/src/theory/evaluator.cpp index dd40ace8a..02083069d 100644 --- a/src/theory/evaluator.cpp +++ b/src/theory/evaluator.cpp @@ -434,11 +434,11 @@ EvalResult Evaluator::evalInternal(TNode n, const String& s = results[currNode[0]].d_str; if (s.isNumber()) { - results[currNode] = EvalResult(Rational(-1)); + results[currNode] = EvalResult(Rational(s.toNumber())); } else { - results[currNode] = EvalResult(Rational(s.toNumber())); + results[currNode] = EvalResult(Rational(-1)); } break; } -- 2.30.2