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
diff --git a/apps/menu.h b/apps/menu.h
index df5f7ce..7ace513 100644
--- a/apps/menu.h
+++ b/apps/menu.h
@@ -91,7 +91,8 @@
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;