Skip to content

Commit c380563

Browse files
committedJun 18, 2014
Fix issue #1275 - one more missing check.
1 parent c0e4551 commit c380563

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/serverobject.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ ItemStack ServerActiveObject::getWieldedItem() const
7878
if(inv)
7979
{
8080
const InventoryList *list = inv->getList(getWieldList());
81-
if(list)
81+
if(list && (getWieldIndex() < (s32)list->getSize()))
8282
return list->getItem(getWieldIndex());
8383
}
8484
return ItemStack();

0 commit comments

Comments
 (0)
Please sign in to comment.