From 8c72e6b1374b00921afbdfd6b0b6bc182f8ac9bf Mon Sep 17 00:00:00 2001 From: 4am Date: Sun, 13 Oct 2019 22:22:40 -0400 Subject: [PATCH] fix crash when entering browse mode from help screen via left arrow --- src/ui.browse.mode.a | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ui.browse.mode.a b/src/ui.browse.mode.a index 4655343d6..113f91301 100644 --- a/src/ui.browse.mode.a +++ b/src/ui.browse.mode.a @@ -71,8 +71,16 @@ OnBrowseSearch OnBrowsePrevious ldx gGameToLaunch + inx ; Slightly pathological case: there may be no + ; current game by the time we get here, e.g. + ; if we entered browse mode by pressing left + ; or up arrow from the global help screen. + ; In this case, pretend we were at game 0 and + ; continue with the key handler logic. + beq + + dex bne .decindex - ldx GameCount ++ ldx GameCount .decindex dex