From 449309fc3d5c49e1e71ad13d9782f085404edc9a 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 --- .../Fix-AIOOBE-in-inventory-handling.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch diff --git a/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch b/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch new file mode 100644 index 0000000000..01681abc17 --- /dev/null +++ b/Spigot-Server-Patches/Fix-AIOOBE-in-inventory-handling.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -0,0 +0,0 @@ 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()); +-- \ No newline at end of file