Use MALLOC for MenuX allocation

This commit is contained in:
Kp 2013-07-06 03:08:37 +00:00
parent fd66f82186
commit db7092106d

View file

@ -68,7 +68,7 @@ int MenuX( int x, int y, int NumButtons, char * text[] )
MALLOC(m, menu, 1);
m->num_buttons = NumButtons;
m->button_g = (UI_GADGET_BUTTON **) d_malloc(sizeof(UI_GADGET_BUTTON *)*NumButtons);
m->button = (char **) d_malloc(sizeof(char *)*NumButtons);
MALLOC(m->button, char *, NumButtons);
m->choice = &choice;
button_width = button_height = 0;