fix y2k overflow.

_ReadTimeHex returns the year as an offset from 1900, so 2020 is 120, which overflows ('0' + 12 is ascii '<')

subtract 100, repeatedly, until it fits in 2 digits.  Should last into 2100.
This commit is contained in:
Kelvin Sherlock 2020-01-06 19:44:51 -05:00
parent 552603d2e0
commit 7336daffbf

View File

@ -3941,7 +3941,11 @@ datop rep $30
pla
xba
and #$ff
jsr :num
]y2k cmp #100
bcc :yy
sbc #100
bne ]y2k
:yy jsr :num
sta :buffer1+7
lda 1,s
and #$ff