Fixed a changelog export/import problem with tagcache where <CR> or <LF>

characters in a tag could cause the parser fail to import a track
statistics correctly. Now line feeds are escaped properly and carriage
returns ignored on import.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30021 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2011-06-20 15:53:33 +00:00
parent c56cca261a
commit f2ef42c1da
2 changed files with 23 additions and 21 deletions

View file

@ -184,15 +184,7 @@ int fast_readline(int fd, char *buf, int buf_size, void *parameters,
if (rc >= 0)
buf[pos+rc] = '\0';
if ( (p = strchr(buf, '\r')) != NULL)
{
*p = '\0';
next = ++p;
}
else
p = buf;
if ( (p = strchr(p, '\n')) != NULL)
if ( (p = strchr(buf, '\n')) != NULL)
{
*p = '\0';
next = ++p;