Allocate correct menu struct.

This commit is contained in:
momo5502 2015-12-24 14:39:11 +01:00
parent deb31a6533
commit a981d3b2ff

View File

@ -109,7 +109,7 @@ namespace Components
Game::menuDef_t* Menus::ParseMenu(int handle) Game::menuDef_t* Menus::ParseMenu(int handle)
{ {
Game::menuDef_t* menu = (Game::menuDef_t*)calloc(1, 2048); // FIXME: tentative size Game::menuDef_t* menu = (Game::menuDef_t*)calloc(1, sizeof(Game::menuDef_t));
menu->items = (Game::itemDef_t**)calloc(512, sizeof(Game::itemDef_t*)); menu->items = (Game::itemDef_t**)calloc(512, sizeof(Game::itemDef_t*));
Menus::MenuList.push_back(menu); Menus::MenuList.push_back(menu);