fix off-by-1 bug in okvs_next

This commit is contained in:
4am 2019-09-23 13:14:27 -04:00
parent ecca066038
commit f627796bbf

View File

@ -304,12 +304,13 @@ okvs_get_current
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
okvs_next okvs_next
+STAY PARAM +STAY PARAM
inx
stx SAVE stx SAVE
jsr okvs_len jsr okvs_len
cmp SAVE cmp SAVE
bne + bne +
ldx #$FF ldx #$00
+ inx +
+LDAY PARAM +LDAY PARAM
; execution falls through here ; execution falls through here
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------