zasm: fix wrong logic in .numberTruncated error condition

`xor c` didn't do what I thought it did at the time. Newbie mistake,
there are probably a lot like this scattered around...
This commit is contained in:
Virgil Dupras 2019-05-12 21:23:24 -04:00
parent 71cbd24e1f
commit 86cad39de4

View File

@ -620,7 +620,7 @@ getUpcode:
inc hl ; MSB is 2nd byte inc hl ; MSB is 2nd byte
ld a, (hl) ld a, (hl)
dec hl ; HL now points to LSB dec hl ; HL now points to LSB
cp 0 or a ; cp 0
jr nz, .numberTruncated jr nz, .numberTruncated
; HL points to our number ; HL points to our number
; one last thing to check. Is the 7th bit on the displacement value set? ; one last thing to check. Is the 7th bit on the displacement value set?
@ -655,7 +655,7 @@ getUpcode:
jr .end jr .end
.numberTruncated: .numberTruncated:
; problem: not zero, so value is truncated. error ; problem: not zero, so value is truncated. error
xor c ld c, 0
.end: .end:
ld a, c ld a, c
pop bc pop bc