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:
parent
ae64d2602b
commit
6848961aa5
22 changed files with 146 additions and 102 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue