mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
Fix an AIOOBE in inventory handling
Closes GH-404
This commit is contained in:
parent
8d5cd3f054
commit
e153f46603
@ -0,0 +1,22 @@
|
||||
From e213810b08430378c89b236a2bb3378603f79a0e Mon Sep 17 00:00:00 2001
|
||||
From: Brokkonaut <hannos17@gmx.de>
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user