1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Nils Wallménius 2008-04-09 15:25:17 +00:00
parent ae64d2602b
commit 6848961aa5
22 changed files with 146 additions and 102 deletions

View file

@ -254,10 +254,10 @@ void generate(void)
rb->write(fd,&dirs_count,sizeof(int));
rb->close(fd);
}
char *list_get_name_cb(int selected_item,void* data,char* buf)
char *list_get_name_cb(int selected_item, void* data, char* buf, size_t buf_len)
{
(void)data;
rb->strcpy(buf,list->folder[selected_item]);
rb->strncpy(buf, list->folder[selected_item], buf_len);
return buf;
}