From 052c91e44f98c875cd379ed7f5605dffeccc4af2 Mon Sep 17 00:00:00 2001 From: tuz358 Date: Mon, 5 Mar 2018 17:05:48 +0900 Subject: [PATCH] mov_eax_imm32: Bug fix due to forgetting endian conversion --- instructions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instructions.cpp b/instructions.cpp index 10de040..302c584 100644 --- a/instructions.cpp +++ b/instructions.cpp @@ -236,10 +236,10 @@ void Instructions::nop(){ void Instructions::mov_eax_imm32(){ printf("mov_eax_imm32 called.\n"); - this->eip++; uint32_t imm32 = memory.read_uint32(this->eip); + imm32 = swap_endian32(imm32); this->registers[0] = imm32; - this->eip += 3; + this->eip += 4; } void Instructions::mov_ecx_imm32(){