aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2014-06-17 18:18:55 +0200
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-06-18 14:53:43 +0200
commitc380563a12d82603255e271af005e042bde0d42d (patch)
tree5bb9ad306cccd724a3315ba21ce312fc4bc85f3c
parentc0e4551249dcc1e09ee09877f136ce12fe359520 (diff)
downloadminetest-c380563a12d82603255e271af005e042bde0d42d.tar.gz
minetest-c380563a12d82603255e271af005e042bde0d42d.tar.bz2
minetest-c380563a12d82603255e271af005e042bde0d42d.zip
Fix issue #1275 - one more missing check.
-rw-r--r--src/serverobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/serverobject.cpp b/src/serverobject.cpp
index 95735de17..81307bc34 100644
--- a/src/serverobject.cpp
+++ b/src/serverobject.cpp
@@ -78,7 +78,7 @@ ItemStack ServerActiveObject::getWieldedItem() const
if(inv)
{
const InventoryList *list = inv->getList(getWieldList());
- if(list)
+ if(list && (getWieldIndex() < (s32)list->getSize()))
return list->getItem(getWieldIndex());
}
return ItemStack();