about summary refs log tree commit diff homepage
path: root/lib/Core/SeedInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Core/SeedInfo.cpp')
-rw-r--r--lib/Core/SeedInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Core/SeedInfo.cpp b/lib/Core/SeedInfo.cpp
index 30377ee4..62b71e87 100644
--- a/lib/Core/SeedInfo.cpp
+++ b/lib/Core/SeedInfo.cpp
@@ -77,9 +77,9 @@ void SeedInfo::patchSeed(const ExecutionState &state,
   for (std::vector< ref<ReadExpr> >::iterator it = reads.begin(), 
          ie = reads.end(); it != ie; ++it) {
     ReadExpr *re = it->get();
-    if (re->index->isConstant()) {
-      unsigned index = (unsigned) re->index->getConstantValue();
-      directReads.insert(std::make_pair(re->updates.root, index));
+    if (ConstantExpr *CE = dyn_cast<ConstantExpr>(re->index)) {
+      directReads.insert(std::make_pair(re->updates.root, 
+                                        (unsigned) CE->getConstantValue()));
     }
   }