summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-01 14:47:49 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-01 14:47:49 +0200
commit64f6ddf1e2171dd7713f454c792916257e770f98 (patch)
tree70e0a745a13bd11f445b546374df8d50768d8f81 /src/Items/ItemHandler.cpp
parentMerge pull request #1140 from mc-server/FixMingw (diff)
downloadcuberite-64f6ddf1e2171dd7713f454c792916257e770f98.tar
cuberite-64f6ddf1e2171dd7713f454c792916257e770f98.tar.gz
cuberite-64f6ddf1e2171dd7713f454c792916257e770f98.tar.bz2
cuberite-64f6ddf1e2171dd7713f454c792916257e770f98.tar.lz
cuberite-64f6ddf1e2171dd7713f454c792916257e770f98.tar.xz
cuberite-64f6ddf1e2171dd7713f454c792916257e770f98.tar.zst
cuberite-64f6ddf1e2171dd7713f454c792916257e770f98.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..0f56b2b90 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) || (a_ItemType >= ARRAYCOUNT(m_ItemHandler)) || (!IsValidBlock(a_ItemType) && !IsValidItem(a_ItemType)))
{
// Either nothing (-1), or bad value, both cases should return the air handler
if (a_ItemType < -1)