Skip to content

Commit 0d20b02

Browse files
committed
🐛 This bug was almost 3 years old omg (and it was introduced on my bday)
Fix boundary condition in slot check to prevent out-of-bounds access.
1 parent 124aafb commit 0d20b02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/marcusslover/plus/lib/item/MenuManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void onClick(InventoryClickEvent event) {
115115
ClickContext genericClick = canvas.genericClick();
116116
handleOnClick(event, canvas, item, genericClick);
117117

118-
if (slot > size) {
118+
if (slot >= size) {
119119
ClickContext selfInventory = canvas.selfInventory();
120120
handleOnClick(event, canvas, item, selfInventory);
121121
return;

0 commit comments

Comments
 (0)