From 40b5d1d3700b91fba562513f1def5937de3d084f Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Tue, 29 Aug 2023 19:42:42 +0200 Subject: [PATCH] cpu/decoder - Fix decoding of JR e instruction --- cpu/decoder.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cpu/decoder.cpp b/cpu/decoder.cpp index 01c45a3..010b7b2 100644 --- a/cpu/decoder.cpp +++ b/cpu/decoder.cpp @@ -288,10 +288,8 @@ void Cpu::executeInstruction() state.PC = state.HL; break; case 0x18: // JR e - { - s8 e = readPC8(); - state.PC += e; - } + state.PC += (s8)readPC8(); + break; case 0xCD: // CALL nn doCall(readPC16()); mcycles = 6; break; case 0xC9: // RET