forked from len0rd/rockbox
FS#10834 by Alex Bennee, fixing off-by-one bug in code calling format_track_path
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23879 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
51d89e2594
commit
ee15637749
1 changed files with 2 additions and 3 deletions
|
|
@ -1348,7 +1348,7 @@ static int get_filename(struct playlist_info* playlist, int index, int seek,
|
||||||
if (playlist->filenames[index] != NULL)
|
if (playlist->filenames[index] != NULL)
|
||||||
{
|
{
|
||||||
dircache_copy_path(playlist->filenames[index], tmp_buf, sizeof(tmp_buf)-1);
|
dircache_copy_path(playlist->filenames[index], tmp_buf, sizeof(tmp_buf)-1);
|
||||||
max = strlen(tmp_buf) + 1;
|
max = strlen(tmp_buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
@ -1357,8 +1357,7 @@ static int get_filename(struct playlist_info* playlist, int index, int seek,
|
||||||
|
|
||||||
if (playlist->in_ram && !control_file && max < 0)
|
if (playlist->in_ram && !control_file && max < 0)
|
||||||
{
|
{
|
||||||
strlcpy(tmp_buf, &playlist->buffer[seek], sizeof(tmp_buf));
|
max = strlcpy(tmp_buf, &playlist->buffer[seek], sizeof(tmp_buf));
|
||||||
max = strlen(tmp_buf) + 1;
|
|
||||||
}
|
}
|
||||||
else if (max < 0)
|
else if (max < 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue