From 525391144a7141a83008eaa27a74f925cc94ce2c Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 30 Aug 2022 16:41:20 +0200 Subject: [PATCH] Emulator: Fix increment HL opcode --- src/cpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu.cpp b/src/cpu.cpp index 4980625..bcbe542 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -892,7 +892,7 @@ void CPU::inc16() switch (opcode) { case 0x03: /* INC BC */ setBC(bc() + 1); break; case 0x13: /* INC DE */ setDE(de() + 1); break; - case 0x23: /* INC HL */ setHL(de() + 1); break; + case 0x23: /* INC HL */ setHL(hl() + 1); break; case 0x24: /* INC SP */ m_sp = (m_sp + 1) & 0xffff; break; default: VERIFY_NOT_REACHED();