Skip to content

Adding an out of bound check for scry hotkey#3

Open
WojtekTB wants to merge 1 commit intodaviscook477:masterfrom
WojtekTB:ScryOutOfBounceBug
Open

Adding an out of bound check for scry hotkey#3
WojtekTB wants to merge 1 commit intodaviscook477:masterfrom
WojtekTB:ScryOutOfBounceBug

Conversation

@WojtekTB
Copy link

regarding this error that happens when you try to hotkey a scry card number that is higher than the number of cards shown to you:

	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
	at java.util.ArrayList.get(ArrayList.java:433)
	at test447.keycuts.patches.cards.GridCardSelectScreenPatches$Update.Insert(GridCardSelectScreenPatches.java:71)
	at com.megacrit.cardcrawl.screens.select.GridCardSelectScreen.update(GridCardSelectScreen.java:143)
	at com.megacrit.cardcrawl.dungeons.AbstractDungeon.update(AbstractDungeon.java:2564)
	at com.megacrit.cardcrawl.core.CardCrawlGame.update(CardCrawlGame.java:876)
	at com.megacrit.cardcrawl.core.CardCrawlGame.render(CardCrawlGame.java:423)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)```

regarding this error that happens when you try to hotkey a scry card number that is higher than the number of cards shown to you: ```java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
	at java.util.ArrayList.get(ArrayList.java:433)
	at test447.keycuts.patches.cards.GridCardSelectScreenPatches$Update.Insert(GridCardSelectScreenPatches.java:71)
	at com.megacrit.cardcrawl.screens.select.GridCardSelectScreen.update(GridCardSelectScreen.java:143)
	at com.megacrit.cardcrawl.dungeons.AbstractDungeon.update(AbstractDungeon.java:2564)
	at com.megacrit.cardcrawl.core.CardCrawlGame.update(CardCrawlGame.java:876)
	at com.megacrit.cardcrawl.core.CardCrawlGame.render(CardCrawlGame.java:423)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)```
@WojtekTB
Copy link
Author

Fix for #1

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