From 8c6fdc3f393a9744c0b110d193eaa403ac0ae871 Mon Sep 17 00:00:00 2001 From: slack Date: Wed, 1 Oct 2008 22:19:17 +0200 Subject: [PATCH] Fixed REALLY STUPID copy&paste bug in INC (HL) --- gbcore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gbcore.cc b/gbcore.cc index 92b2d0c..16c8042 100644 --- a/gbcore.cc +++ b/gbcore.cc @@ -326,7 +326,7 @@ GameBoy::run_status GameBoy::run_cycle() case 0x34: {//INC (HL) int half_res = (memory.read(regs.HL) & 0x0F) + 1; - memory.write(regs.HL, memory.read(regs.HL) - 1); + memory.write(regs.HL, memory.read(regs.HL) + 1); reset_flag(ADD_SUB_FLAG); set_flag_if (memory.read(regs.HL) == 0, ZERO_FLAG); set_flag_if (half_res > 0x0F, HALF_CARRY_FLAG); -- 2.34.1