Skip to content
Permalink
Browse files

Client: Don't crash if trying to draw too many items from inventory i…

…n HUD
  • Loading branch information...
celeron55 committed Apr 27, 2014
1 parent 3a6d6e4 commit 8d315347100f1d261bb496b6c73f8cab5d2b7a41
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hud.cpp
@@ -127,7 +127,7 @@ void Hud::drawItem(v2s32 upperleftpos, s32 imgsize, s32 itemcount,
NULL, hbar_colors, true);
}

for (s32 i = 0; i < itemcount; i++)
for (s32 i = 0; i < itemcount && (size_t)i < mainlist->getSize(); i++)
{
const ItemStack &item = mainlist->getItem(i);

0 comments on commit 8d31534

Please sign in to comment.
You can’t perform that action at this time.