summaryrefslogtreecommitdiff
path: root/apps/menu.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-04-09 15:25:17 +0000
committerNils Wallménius <nils@rockbox.org>2008-04-09 15:25:17 +0000
commit6848961aa5f93a290917071ff3496e1d5026621b (patch)
tree70d377348ab0694c356fffd9fe25f095ccbe88fe /apps/menu.c
parentae64d2602befd5589c8c0141a6d812841fdfb232 (diff)
Pass the buffer length to the list_get_name callback functions instead of using hardcoded MAX_PATH
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17049 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/menu.c b/apps/menu.c
index de17f2a809..c215d6812d 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -93,13 +93,16 @@ static int find_menu_selection(int selected)
return i;
return 0;
}
-static char * get_menu_item_name(int selected_item,void * data, char *buffer)
+static char * get_menu_item_name(int selected_item,
+ void * data,
+ char *buffer,
+ size_t buffer_len)
{
const struct menu_item_ex *menu = (const struct menu_item_ex *)data;
int type = (menu->flags&MENU_TYPE_MASK);
selected_item = get_menu_selection(selected_item, menu);
- (void)buffer;
+ (void)buffer_len;
/* only MT_MENU or MT_RETURN_ID is allowed in here */
if (type == MT_RETURN_ID)
{