summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-01 21:41:12 +0200
committerMattes D <github@xoft.cz>2014-07-01 21:41:12 +0200
commit621400c9c6a054325e1c7c5d5ecb5dd542127cc1 (patch)
treebeddb9e6293e4bb3a7aba04d1d7901f1e0af27e0 /src/Items
parentMerge pull request #1140 from mc-server/FixMingw (diff)
parentOnly fixes the server crash. (diff)
downloadcuberite-621400c9c6a054325e1c7c5d5ecb5dd542127cc1.tar
cuberite-621400c9c6a054325e1c7c5d5ecb5dd542127cc1.tar.gz
cuberite-621400c9c6a054325e1c7c5d5ecb5dd542127cc1.tar.bz2
cuberite-621400c9c6a054325e1c7c5d5ecb5dd542127cc1.tar.lz
cuberite-621400c9c6a054325e1c7c5d5ecb5dd542127cc1.tar.xz
cuberite-621400c9c6a054325e1c7c5d5ecb5dd542127cc1.tar.zst
cuberite-621400c9c6a054325e1c7c5d5ecb5dd542127cc1.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemHandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index a2fd4e3f8..423039cf4 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -63,7 +63,7 @@ cItemHandler * cItemHandler::m_ItemHandler[2268];
cItemHandler * cItemHandler::GetItemHandler(int a_ItemType)
{
- if (a_ItemType < 0)
+ if ((a_ItemType < 0) || ((unsigned long)a_ItemType >= ARRAYCOUNT(m_ItemHandler)))
{
// Either nothing (-1), or bad value, both cases should return the air handler
if (a_ItemType < -1)