diff options
author | Nassim Jahnke <[email protected]> | 2023-11-03 14:49:55 +1000 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2023-11-03 14:49:55 +1000 |
commit | 8493340be4fa69fa9369719272e5dff1b7a2f455 (patch) | |
tree | 515bde20d141c3238de3a06aee141aa65b6875f2 | |
parent | 0b218903a88f87738a4e6487a4cb87c8ea4ba211 (diff) | |
download | Paper-8493340be4fa69fa9369719272e5dff1b7a2f455.tar.gz Paper-8493340be4fa69fa9369719272e5dff1b7a2f455.zip |
Add another slot sanity check
-rw-r--r-- | patches/server/1015-Add-slot-sanity-checks-in-container-clicks.patch | 4 |
1 files 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(); |