From 9351ece26ed91429fcad287595a8faa6a88a3b49 Mon Sep 17 00:00:00 2001 From: MarioE Date: Tue, 24 Jul 2012 14:47:23 -0400 Subject: [PATCH] Item drop crash exploit --- TShockAPI/GetDataHandlers.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 464da044..afe06cb4 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2448,6 +2448,11 @@ namespace TShockAPI if (OnItemDrop(id, pos, vel, stacks, prefix, type)) return true; + // player is attempting to crash clients + if (type < 0 || type >= Main.maxItemTypes) + { + return true; + } if (type == 0) //Item removed, let client do this to prevent item duplication client side { return false;