unit: Fixed a crash when exiting the select menu
authorLukas Krickl <lukas@krickl.dev>
Mon, 1 Sep 2025 03:04:17 +0000 (05:04 +0200)
committerLukas Krickl <lukas@krickl.dev>
Mon, 1 Sep 2025 03:04:17 +0000 (05:04 +0200)
This crash was caused by the player state being set incorrectly.

src/unit.s

index 1561458a274fb9e61c4a114904f02a9389befbc6..9e315b80ca4cd4a10baf0012e2242d7befa4a984 100644 (file)
@@ -306,9 +306,7 @@ unit_handle_inputs:
        ld b, BTNSELECT
        input_just
        jr z, @notselect REL
-               pop bc
                call action_menu_init
-               push bc ; bc = next state
 @notselect:
   
   ld b, BTNUP