projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0e4551
)
Fix issue #1275 - one more missing check.
author
RealBadAngel
<maciej.kasatkin@o2.pl>
Tue, 17 Jun 2014 16:18:55 +0000
(18:18 +0200)
committer
RealBadAngel
<maciej.kasatkin@o2.pl>
Wed, 18 Jun 2014 12:53:43 +0000
(14:53 +0200)
src/serverobject.cpp
patch
|
blob
|
history
diff --git
a/src/serverobject.cpp
b/src/serverobject.cpp
index 95735de17ce4a2f36aacba35ab40179acabfe12e..81307bc34f23a69d5f51f8e80bcc96d8b6fb6c9d 100644
(file)
--- 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();