mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
metadata: Explicitly use base 10 when parsing track numbers
Otherwise stuff with a leading 0 gets parsed as octal, leading to failures to parse '08' and '09' Change-Id: I997c505617104733793c6c113d4915bd4fd912e5
This commit is contained in:
parent
488b915432
commit
70e9ae0996
3 changed files with 3 additions and 3 deletions
|
|
@ -476,7 +476,7 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
|
|||
asf_utf16LEdecode(fd, length, &id3buf, &id3buf_remaining);
|
||||
if (strlen(id3->track_string)) {
|
||||
char *p = NULL;
|
||||
int tracknum = strtol(id3->track_string, &p, 0);
|
||||
int tracknum = strtol(id3->track_string, &p, 10);
|
||||
if (!(tracknum == 0 && (errno || *p)))
|
||||
id3->tracknum = tracknum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ static int parsetracknum( struct mp3entry* entry, char* tag, int bufferpos )
|
|||
{
|
||||
if (strlen(tag)) {
|
||||
char *p = NULL;
|
||||
int tracknum = strtol(tag, &p, 0);
|
||||
int tracknum = strtol(tag, &p, 10);
|
||||
if (!(tracknum == 0 && (errno || *p)))
|
||||
entry->tracknum = tracknum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
|
|||
{
|
||||
if (strlen(value)) {
|
||||
char *p = NULL;
|
||||
int tracknum = strtol(value, &p, 0);
|
||||
int tracknum = strtol(value, &p, 10);
|
||||
if (!(tracknum == 0 && (errno || *p)))
|
||||
id3->tracknum = tracknum;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue