diff options
Diffstat (limited to 'Minecraft.World/ContainerSetContentPacket.cpp')
| -rw-r--r-- | Minecraft.World/ContainerSetContentPacket.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Minecraft.World/ContainerSetContentPacket.cpp b/Minecraft.World/ContainerSetContentPacket.cpp index ae76e0f0..28ce64e9 100644 --- a/Minecraft.World/ContainerSetContentPacket.cpp +++ b/Minecraft.World/ContainerSetContentPacket.cpp @@ -32,6 +32,9 @@ void ContainerSetContentPacket::read(DataInputStream *dis) //throws IOException { containerId = dis->readByte(); int count = dis->readShort(); + + if (count < 0 || count > 256) count = 0; + items = ItemInstanceArray(count); for (int i = 0; i < count; i++) { |
