path: root/apps/menu.h
diff options
authorWilliam Wilgus <>2019-09-20 03:07:29 -0500
committerWilliam Wilgus <>2019-09-20 03:07:29 -0500
commit10e5e56f3c62383afba30b553fac1ee624a8428d (patch)
tree4431aa03b77fb7724933c8ac21c53a26d545f869 /apps/menu.h
parentd0883d747ab7eb7a26364f01d2ab2f5445fbc204 (diff)
Bug fix dynamic menus
Dynamic menus had a buffer_len variable in the parent function but it was discarded before passing to the callbacks Why!!?? No clue but everything that used it was assuming MAXPATH Wouldn't be surprised to see some bugs pop out from this one.. init_menu_lists() was assuming MENU_HAS_DESC and setting the menu title + icon based on such even though it could be invalid didn't see anywhere in the code that was currently using MENU_DYNAMIC_DESC in relation to a top level menu but considering it caused all kinds of corruption to the menu when I tried its probably been tried and abandoned before... Change-Id: I8d961d748918bfa8ea6adb5ad60491af4d739d6e
Diffstat (limited to 'apps/menu.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/menu.h b/apps/menu.h
index df5f7ced9f..7ace51329f 100644
--- a/apps/menu.h
+++ b/apps/menu.h
@@ -91,7 +91,8 @@ struct menu_item_ex {
const struct menu_get_name_and_icon {
int (*menu_callback)(int action,
const struct menu_item_ex *this_item);
- char *(*list_get_name)(int selected_item, void * data, char *buffer);
+ char *(*list_get_name)(int selected_item, void * data,
+ char *buffer, size_t buffer_len);
int (*list_speak_item)(int selected_item, void * data);
void *list_get_name_data;
int icon_id;