Skip to content

Fix the crash when opening the box manager on a short box - #59

Open
gui-camargo wants to merge 1 commit into
sofianeelhor:mainfrom
gui-camargo:fix/box-manager-capacity
Open

gui-camargo wants to merge 1 commit into
sofianeelhor:mainfrom
gui-camargo:fix/box-manager-capacity

Conversation

@gui-camargo

Copy link
Copy Markdown

Fixes a crash on tapping the box name.

The box name opens the box manager. Its neighbor cards read every cell of the 6×5 grid, and copying a box or counting a batch did the same. Gen 1 and Gen 2 international boxes hold 20 slots, and Let's Go holds 25. The next read throws ArgumentOutOfRangeException (box 0, slot 20 on Pokémon Blue) and the page closes.

The manager now reads only the slots the open save stores. The grid is still 6×5; the cells past the real box stay empty.

Reproduced on an AYN Thor with Pokémon Blue (INT), then checked again after the fix: tapping the box name opens the manager.

Tapping the box name opens the box manager. Its neighbor cards read
every cell of the 6x5 grid, and copying a box or counting a batch did
the same. Gen 1 and Gen 2 international boxes hold 20 slots, and Let's
Go holds 25, so the next slot threw and closed the app. Read only the
slots the open save stores.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant