mirror of
https://github.com/a2-4am/4cade.git
synced 2024-09-30 00:56:24 +00:00
off-by-1 bugs, and missing exit condition, in the dots loop
This commit is contained in:
parent
7c9b56a023
commit
c8e9d9ab9d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user