diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-07-01 20:34:50 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-07-01 20:34:50 +0200 |
commit | 64e66674355c84c091564197dcbdf26806e61659 (patch) | |
tree | beddb9e6293e4bb3a7aba04d1d7901f1e0af27e0 /src/Items/ItemHandler.cpp | |
parent | Fix server-crash with non-existing items. (diff) | |
download | cuberite-64e66674355c84c091564197dcbdf26806e61659.tar cuberite-64e66674355c84c091564197dcbdf26806e61659.tar.gz cuberite-64e66674355c84c091564197dcbdf26806e61659.tar.bz2 cuberite-64e66674355c84c091564197dcbdf26806e61659.tar.lz cuberite-64e66674355c84c091564197dcbdf26806e61659.tar.xz cuberite-64e66674355c84c091564197dcbdf26806e61659.tar.zst cuberite-64e66674355c84c091564197dcbdf26806e61659.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemHandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp index 0f56b2b90..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) || (a_ItemType >= ARRAYCOUNT(m_ItemHandler)) || (!IsValidBlock(a_ItemType) && !IsValidItem(a_ItemType))) + 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) |