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