diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2011-06-20 15:53:33 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2011-06-20 15:53:33 +0000 |
commit | f2ef42c1da977402e19e6ac77165f9cd0fd25643 (patch) | |
tree | e754ee56e727aa3f2741f820ffc3f6a22aa368ca /apps/misc.c | |
parent | c56cca261a4e8a72443a3fdf79152782c7c731e5 (diff) | |
download | rockbox-f2ef42c1da977402e19e6ac77165f9cd0fd25643.tar.gz rockbox-f2ef42c1da977402e19e6ac77165f9cd0fd25643.zip |
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
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/apps/misc.c b/apps/misc.c index 12aaf08c7b..68775b36f5 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -184,15 +184,7 @@ int fast_readline(int fd, char *buf, int buf_size, void *parameters, | |||
184 | if (rc >= 0) | 184 | if (rc >= 0) |
185 | buf[pos+rc] = '\0'; | 185 | buf[pos+rc] = '\0'; |
186 | 186 | ||
187 | if ( (p = strchr(buf, '\r')) != NULL) | 187 | if ( (p = strchr(buf, '\n')) != NULL) |
188 | { | ||
189 | *p = '\0'; | ||
190 | next = ++p; | ||
191 | } | ||
192 | else | ||
193 | p = buf; | ||
194 | |||
195 | if ( (p = strchr(p, '\n')) != NULL) | ||
196 | { | 188 | { |
197 | *p = '\0'; | 189 | *p = '\0'; |
198 | next = ++p; | 190 | next = ++p; |