1.1 --- a/extensions/topmenus/TopMenu.cpp Mon May 05 11:54:12 2014 -0400
1.2 +++ b/extensions/topmenus/TopMenu.cpp Tue May 06 18:40:35 2014 -0700
1.3 @@ -93,7 +93,7 @@
1.4
1.5 size += m_Config.strings.GetMemTable()->GetMemUsage();
1.6 size += (m_Config.cats.size() * sizeof(int));
1.7 - size += (sizeof(topmenu_player_t) * (ABSOLUTE_PLAYER_LIMIT + 1));
1.8 + size += (sizeof(topmenu_player_t) * (SM_MAXPLAYERS + 1));
1.9 size += (m_SortedCats.size() * sizeof(unsigned int));
1.10 size += (m_UnsortedCats.size() * sizeof(unsigned int));
1.11 size += (m_Categories.size() * (sizeof(topmenu_category_t *) + sizeof(topmenu_category_t)));
1.12 @@ -938,8 +938,8 @@
1.13 void TopMenu::CreatePlayers(int max_clients)
1.14 {
1.15 m_max_clients = max_clients;
1.16 - m_clients = (topmenu_player_t *)malloc(sizeof(topmenu_player_t) * (ABSOLUTE_PLAYER_LIMIT + 1));
1.17 - memset(m_clients, 0, sizeof(topmenu_player_t) * (ABSOLUTE_PLAYER_LIMIT + 1));
1.18 + m_clients = (topmenu_player_t *)malloc(sizeof(topmenu_player_t) * (SM_MAXPLAYERS + 1));
1.19 + memset(m_clients, 0, sizeof(topmenu_player_t) * (SM_MAXPLAYERS + 1));
1.20 }
1.21
1.22 void TopMenu::TearDownClient(topmenu_player_t *player)