From dd6b0e491f1123cb9b220c2f3de1aca7fafcfb68 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 6 Nov 2013 22:15:32 +1300 Subject: [PATCH] Fixed potential blow up from paintings with idiotic users --- src/me/libraryaddict/disguise/PacketsManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/PacketsManager.java b/src/me/libraryaddict/disguise/PacketsManager.java index 4974dbbe..52ce6ebb 100644 --- a/src/me/libraryaddict/disguise/PacketsManager.java +++ b/src/me/libraryaddict/disguise/PacketsManager.java @@ -202,7 +202,7 @@ public class PacketsManager { int id = ((MiscDisguise) disguise).getId(); if (id == -1) id = new Random().nextInt(EnumArt.values().length); - mods.write(5, EnumArt.values()[id].B); + mods.write(5, EnumArt.values()[id % EnumArt.values().length].B); // Make the teleport packet to make it visible.. spawnPackets[1] = new PacketContainer(Packets.Server.ENTITY_TELEPORT);