diff options
Diffstat (limited to 'lib/Core')
-rw-r--r-- | lib/Core/Memory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Core/Memory.cpp b/lib/Core/Memory.cpp index 08c0696c..c4228823 100644 --- a/lib/Core/Memory.cpp +++ b/lib/Core/Memory.cpp @@ -450,7 +450,7 @@ ref<Expr> ObjectState::read(ref<Expr> offset, Expr::Width width) const { ref<Expr> Byte = read8(AddExpr::create(offset, ConstantExpr::create(idx, Expr::Int32))); - Res = idx ? ConcatExpr::create(Byte, Res) : Byte; + Res = i ? ConcatExpr::create(Byte, Res) : Byte; } return Res; @@ -468,7 +468,7 @@ ref<Expr> ObjectState::read(unsigned offset, Expr::Width width) const { for (unsigned i = 0; i != NumBytes; ++i) { unsigned idx = Context::get().isLittleEndian() ? i : (NumBytes - i - 1); ref<Expr> Byte = read8(offset + idx); - Res = idx ? ConcatExpr::create(Byte, Res) : Byte; + Res = i ? ConcatExpr::create(Byte, Res) : Byte; } return Res; |