diff options
Diffstat (limited to 'src/cpu/6502.c')
-rw-r--r-- | src/cpu/6502.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpu/6502.c b/src/cpu/6502.c index e7c1669..595cd4e 100644 --- a/src/cpu/6502.c +++ b/src/cpu/6502.c @@ -36,7 +36,7 @@ void SetFlagN(byte x){ //Perform prior to any changes TODO: FIX THIS! WTF WERE YOU THINKING? void SetFlagV(byte x, byte y){ address z = (address)x + (address)y; - if (z > 0xFF) + if ((x & 0x80) != (y & 0x80)) SetFlag(flag_V, 1); else SetFlag(flag_V, 0); |