From e153f46603ebf6eed3ca545797d86de67569ed06 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sun, 4 Sep 2016 16:49:29 -0500 Subject: [PATCH] Fix an AIOOBE in inventory handling Closes GH-404 --- ...170-Fix-AIOOBE-in-inventory-handling.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Spigot-Server-Patches/0170-Fix-AIOOBE-in-inventory-handling.patch diff --git a/Spigot-Server-Patches/0170-Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/0170-Fix-AIOOBE-in-inventory-handling.patch new file mode 100644 index 000000000..b43d34a21 --- /dev/null +++ b/Spigot-Server-Patches/0170-Fix-AIOOBE-in-inventory-handling.patch @@ -0,0 +1,22 @@ +From e213810b08430378c89b236a2bb3378603f79a0e Mon Sep 17 00:00:00 2001 +From: Brokkonaut +Date: Sun, 4 Sep 2016 16:35:43 -0500 +Subject: [PATCH] Fix AIOOBE in inventory handling + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 882d82a..c9787ff 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -1816,7 +1816,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + case CLONE: + if (packetplayinwindowclick.c() == 2) { + click = ClickType.MIDDLE; +- if (packetplayinwindowclick.b() == -999) { ++ if (packetplayinwindowclick.b() < 0) { // Paper - GH-404 + action = InventoryAction.NOTHING; + } else { + Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b()); +-- +2.10.0.windows.1 +