diff options
Diffstat (limited to 'lib/Solver/FastCexSolver.cpp')
-rw-r--r-- | lib/Solver/FastCexSolver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Solver/FastCexSolver.cpp b/lib/Solver/FastCexSolver.cpp index af2666ab..8c2fcfe6 100644 --- a/lib/Solver/FastCexSolver.cpp +++ b/lib/Solver/FastCexSolver.cpp @@ -346,7 +346,7 @@ public: if (array.isConstantArray() && index.isFixed() && index.min() < array.size) - return ValueRange(array.constantValues[index.min()]->getConstantValue()); + return ValueRange(array.constantValues[index.min()]->getZExtValue(8)); return ValueRange(0, 255); } @@ -1037,7 +1037,7 @@ FastCexSolver::computeInitialValues(const Query& query, ref<Expr> value = cd.evaluatePossible(read); if (ConstantExpr *CE = dyn_cast<ConstantExpr>(value)) { - data.push_back((unsigned char) CE->getConstantValue()); + data.push_back((unsigned char) CE->getZExtValue(8)); } else { // FIXME: When does this happen? return false; |