about summary refs log tree commit diff homepage
path: root/lib/Core/Memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Core/Memory.cpp')
-rw-r--r--lib/Core/Memory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Core/Memory.cpp b/lib/Core/Memory.cpp
index d8cf0bdb..49198df8 100644
--- a/lib/Core/Memory.cpp
+++ b/lib/Core/Memory.cpp
@@ -187,7 +187,7 @@ const UpdateList &ObjectState::getUpdates() const {
       if (!Value)
         break;
 
-      Contents[Index->getConstantValue()] = Value;
+      Contents[Index->getZExtValue()] = Value;
     }
 
     // FIXME: We should unique these, there is no good reason to create multiple
@@ -400,7 +400,7 @@ void ObjectState::write8(unsigned offset, uint8_t value) {
 void ObjectState::write8(unsigned offset, ref<Expr> value) {
   // can happen when ExtractExpr special cases
   if (ConstantExpr *CE = dyn_cast<ConstantExpr>(value)) {
-    write8(offset, (uint8_t) CE->getConstantValue());
+    write8(offset, (uint8_t) CE->getZExtValue(8));
   } else {
     setKnownSymbolic(offset, value.get());