Fixed a buffer overflow.
This commit is contained in:
@ -18,12 +18,19 @@
|
||||
/** Maximum number of items that the list supports */
|
||||
#define MENULIST_ITEMS_MAX 32
|
||||
|
||||
typedef struct _menulist_t menulist_t;
|
||||
|
||||
/** Callback for when a menulist item is selected */
|
||||
typedef void menulistcallback_t(menulist_t *list, uint8_t i, void *user);
|
||||
|
||||
/** Representation of a menu list, a menu with multiple menu items. */
|
||||
typedef struct {
|
||||
typedef struct _menulist_t {
|
||||
float x, y;
|
||||
char *items[MENULIST_ITEMS_MAX];
|
||||
label_t labels[MENULIST_ITEMS_MAX];
|
||||
frame_t frame;
|
||||
menu_t menu;
|
||||
rectangle_t selection;
|
||||
menulistcallback_t *onSelect;
|
||||
void *user;
|
||||
} menulist_t;
|
Reference in New Issue
Block a user