From: Andres Noetzli Date: Wed, 1 Aug 2018 23:08:47 +0000 (-0700) Subject: Fix wrong evaluation of STRING_STOI (#2252) X-Git-Tag: cvc5-1.0.0~4834 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=113e7001e03ec7d1c2b79e0bb2cc9b762519bc22;p=cvc5.git Fix wrong evaluation of STRING_STOI (#2252) --- 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; }