From c8e9d9ab9d4278771737dea3b3643e9163073664 Mon Sep 17 00:00:00 2001 From: 4am Date: Thu, 4 Jul 2019 16:23:29 -0400 Subject: [PATCH] off-by-1 bugs, and missing exit condition, in the dots loop --- src/ui.search.mode.a | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ui.search.mode.a b/src/ui.search.mode.a index 43bc841cc..00bd8640c 100644 --- a/src/ui.search.mode.a +++ b/src/ui.search.mode.a @@ -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