summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c
index bb34c15..858af23 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -93,11 +93,18 @@ int drawgrav_enable = 0;
void menu_count(void)//puts the number of elements in each section into .itemcount
{
int i=0;
+ for (i=0;i<SC_TOTAL;i++)
+ {
+ msections[i].itemcount = 0;
+ }
msections[SC_LIFE].itemcount = NGOLALT;
msections[SC_WALL].itemcount = UI_WALLCOUNT-4;
for (i=0; i<PT_NUM; i++)
{
- msections[ptypes[i].menusection].itemcount+=ptypes[i].menu;
+ if (ptypes[i].menusection<SC_TOTAL)
+ {
+ msections[ptypes[i].menusection].itemcount+=ptypes[i].menu;
+ }
}
}