list highlight crashing program
What you were trying to do
selling items to a planetary trade post
What actually happened
I sold the last item on my list and the highlight disappeared. I tapped up to restore it and the program crashed
How to reproduce
- enter trade talks
- sell last item on list
- tap a direction
Game version
2.1.0
Log details
`java.lang.IndexOutOfBoundsException: Index: 7, Size: 7
at java.util.ArrayList.rangeCheck(ArrayList.java:659)
at java.util.ArrayList.get(ArrayList.java:435)
at org.destinationsol.game.item.ItemContainer.getGroup(ItemContainer.java:169)
at org.destinationsol.ui.nui.screens.InventoryScreen.onKeyEvent(InventoryScreen.java:272)
at org.destinationsol.ui.nui.NUIManager.update(NUIManager.java:211)
at org.destinationsol.SolApplication.update(SolApplication.java:264)
at org.destinationsol.SolApplication.safeUpdate(SolApplication.java:241)
at org.destinationsol.SolApplication.render(SolApplication.java:205)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:403)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:143)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.
`
Operating System
Windows
Additional Info
probably have the highlight go to the previous item? I notice when I'm at the top of the list it drops to the next item even as the list updates and moves all the items up one. Actually, when I'm anywhere in the list, the highlight moves to the next position.
#712 should fix this. Would you mind testing it to see if it fixes the issue for you? You can find a pre-built version here.