From dff0df87e9ec6097514591d9f33a5465aff29f57 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 25 Jun 2024 21:20:50 -0500 Subject: [PATCH] bugfix: `inc r16` should not decrement `r16` --- src/cpu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu.rs b/src/cpu.rs index f468977..8c0ad08 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -323,7 +323,7 @@ mod instructions { Ok(()) } pub fn inc16(&mut self, reg: R16) -> IResult { - self[reg] -= 1; + self[reg] += 1; Ok(()) } pub fn dec16(&mut self, reg: R16) -> IResult {