diff --git a/src/mos6502.c b/src/mos6502.c index 5972831..6904833 100644 --- a/src/mos6502.c +++ b/src/mos6502.c @@ -271,7 +271,7 @@ mos6502_modify_status(mos6502 *cpu, vm_8bit status, int orig, int result) if (status & MOS_ZERO) { cpu->P &= ~MOS_ZERO; - if (result == 0) { + if ((result & 0xff) == 0) { cpu->P |= MOS_ZERO; } }