From 3317def32806c47006ba03ec4c4e206b6b1c88cf Mon Sep 17 00:00:00 2001 From: tuz358 Date: Mon, 5 Mar 2018 12:03:57 +0900 Subject: [PATCH] Minor fix --- instructions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instructions.cpp b/instructions.cpp index 5f0906a..f9b9bf1 100644 --- a/instructions.cpp +++ b/instructions.cpp @@ -33,6 +33,8 @@ void Instructions::init_instructions(){ this->instructions[0xeb] = &Instructions::jmp_imm8; this->instructions[0xf4] = &Instructions::hlt; this->instructions[0xff] = &Instructions::opcode_ff; + + this->instructions[0xcd] = &Instructions::hlt; } void Instructions::init_modrm(){ @@ -160,7 +162,7 @@ void Instructions::jne_imm8(){ printf("jne_imm8 called.\n"); this->eip++; - imm8 = memory.read_uint8(this->eip); + uint8_t imm8 = memory.read_uint8(this->eip); int zero_flag = this->get_flag(ZF); if (!zero_flag) this->eip += imm8;