summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-03-08 20:54:52 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-03-08 20:54:52 +0000
commit7de9091036f099011d6843ce1ccbbcbf3e7dbf53 (patch)
tree0366659fa7fb6596cf92a67bf0c65e6442122823 /src/main/java/net/minecraft/server
parente0d8c1d7ac2db448a9e120e526d278a47c674217 (diff)
downloadcraftbukkit-7de9091036f099011d6843ce1ccbbcbf3e7dbf53.tar
craftbukkit-7de9091036f099011d6843ce1ccbbcbf3e7dbf53.tar.gz
craftbukkit-7de9091036f099011d6843ce1ccbbcbf3e7dbf53.tar.lz
craftbukkit-7de9091036f099011d6843ce1ccbbcbf3e7dbf53.tar.xz
craftbukkit-7de9091036f099011d6843ce1ccbbcbf3e7dbf53.zip
Fixed an exploit allowing item duplication upon death
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/EntityPlayer.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 5c36727d..28756e98 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -94,12 +94,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
for (int i = 0; i < inventory.a.length; ++i) {
if (inventory.a[i] != null) {
loot.add(new CraftItemStack(inventory.a[i]));
+ inventory.a[i] = null;
}
}
for (int i = 0; i < inventory.b.length; ++i) {
if (inventory.b[i] != null) {
loot.add(new CraftItemStack(inventory.b[i]));
+ inventory.a[i] = null;
}
}