mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-14 23:52:26 -05:00
FS#11920: Do not overwrite already existing metadata and take into account string termination. This can save several bytes of the metadata buffer when tags have multiple entries (e.g. multiple gerne tags)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29349 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
85e40257dc
commit
a7e25a01ba
4 changed files with 24 additions and 11 deletions
|
|
@ -337,7 +337,10 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
|
|||
p = NULL;
|
||||
}
|
||||
|
||||
if (p)
|
||||
/* Do not overwrite already available metadata. Especially when reading
|
||||
* tags with e.g. multiple genres / artists. This way only the first
|
||||
* of multiple entries is used, all following are dropped. */
|
||||
if (p!=NULL && *p==NULL)
|
||||
{
|
||||
len = strlen(value);
|
||||
len = MIN(len, buf_remaining - 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue