off-by-1 bugs, and missing exit condition, in the dots loop

This commit is contained in:
4am 2019-07-04 16:23:29 -04:00
parent 7c9b56a023
commit c8e9d9ab9d

View File

@ -239,19 +239,20 @@ SearchMode
dex
bne -
tay
- lda (SRC),y
@dotloop
iny
lda (SRC),y
+LOW_ASCII_TO_LOWER
cmp InputBuffer,x
bne +
lda #$0B ; add dots to highlight matched characters
sta UILine1,y
inx
cpx InputLength
cpx InputLength ; if input buffer is exhausted, we're done
beq @doneHighlight
+ inc HTAB
iny
cpy #40
bne -
cpy SAVE ; if game name is exhausted, we're done
bne @dotloop
@doneHighlight
jsr DrawSearchBarOffscreen; actually draw the search UI (offscreen)
jmp ShowOtherPage ; now show everything at once