From e0b453b79f6d2bc8aaa4d2c389edb24b81d7b0cf Mon Sep 17 00:00:00 2001 From: tuz358 Date: Mon, 5 Mar 2018 17:16:11 +0900 Subject: [PATCH] jmp_imm8: Bug fix (eip address missing) --- instructions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instructions.cpp b/instructions.cpp index aa23013..e66b860 100644 --- a/instructions.cpp +++ b/instructions.cpp @@ -263,9 +263,9 @@ void Instructions::mov_ebx_imm32(){ void Instructions::jmp_imm8() { printf("jmp_imm8 called.\n"); - this->eip++; - uint8_t imm8 = memory.read_uint8(this->eip); + int8_t imm8 = memory.read_int8(this->eip); this->eip += imm8; + this->eip++; } void Instructions::hlt(){