Ars Nouveau

Ars Nouveau

49M Downloads

Crash because of Off-By-One error in GlyphUnlockMenu

McModknower opened this issue ยท 0 comments

commented

In line 292 of GlyphUnlockMenu#onGlyphClick(Button button) there is a check that i is not more than the number of buttons. However the maximum button index is one less, so the check should be a >=.

if (i > itemButtons.size())
break;
itemButtons.get(i).visible = true;
itemButtons.get(i).ingredient = selectedRecipe.inputs.get(i);

Here is a crash report of a user that got the crash:

https://gnomebot.dev/paste/1207996011834904576