From c380563a12d82603255e271af005e042bde0d42d Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Tue, 17 Jun 2014 18:18:55 +0200 Subject: [PATCH] Fix issue #1275 - one more missing check. --- src/serverobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.25.1