projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a6d6e4
)
Client: Don't crash if trying to draw too many items from inventory in HUD
author
Perttu Ahola
<celeron55@gmail.com>
Sun, 27 Apr 2014 06:49:00 +0000
(09:49 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Sun, 27 Apr 2014 06:49:19 +0000
(09:49 +0300)
src/hud.cpp
patch
|
blob
|
history
diff --git
a/src/hud.cpp
b/src/hud.cpp
index 750755649c29cc580fb59870ae93a5b02d42d69d..343b548e9fdf1b91b24048557357431229482003 100644
(file)
--- a/
src/hud.cpp
+++ b/
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);