From 8493340be4fa69fa9369719272e5dff1b7a2f455 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 3 Nov 2023 14:49:55 +1000 Subject: Add another slot sanity check --- patches/server/1015-Add-slot-sanity-checks-in-container-clicks.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/1015-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/1015-Add-slot-sanity-checks-in-container-clicks.patch index 21d4908c2c..c83c1b5818 100644 --- a/patches/server/1015-Add-slot-sanity-checks-in-container-clicks.patch +++ b/patches/server/1015-Add-slot-sanity-checks-in-container-clicks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add slot sanity checks in container clicks diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 3ef712299fe248602b0b117c0a8e285cdf4e05c2..2047224f26bf6c6aa125c15a14fe91d81e5b76ba 100644 +index 3ef712299fe248602b0b117c0a8e285cdf4e05c2..5d298b11f74cd2da47e6613ced621ab62aa73a7b 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -423,6 +423,7 @@ public abstract class AbstractContainerMenu { @@ -20,7 +20,7 @@ index 3ef712299fe248602b0b117c0a8e285cdf4e05c2..2047224f26bf6c6aa125c15a14fe91d8 int j2; if (actionType == ClickType.SWAP) { -+ if (slotIndex < 0) return; // Paper ++ if (slotIndex < 0 || button < 0) return; // Paper slot2 = (Slot) this.slots.get(slotIndex); itemstack1 = playerinventory.getItem(button); itemstack = slot2.getItem(); -- cgit v1.2.3