diff options
| author | Jonas Häggqvist <rasher@rasher.dk> | 2005-06-26 22:43:57 +0000 |
|---|---|---|
| committer | Jonas Häggqvist <rasher@rasher.dk> | 2005-06-26 22:43:57 +0000 |
| commit | e021e1f42c817bf36b0ad84ffff1df797cbfa077 (patch) | |
| tree | 2692db9910ddb326789a90566b950043c86d7049 | |
| parent | ba5f9cf181ee90052dc59934fbc3c664e661b325 (diff) | |
| download | rockbox-e021e1f42c817bf36b0ad84ffff1df797cbfa077.zip rockbox-e021e1f42c817bf36b0ad84ffff1df797cbfa077.tar.gz rockbox-e021e1f42c817bf36b0ad84ffff1df797cbfa077.tar.bz2 rockbox-e021e1f42c817bf36b0ad84ffff1df797cbfa077.tar.xz | |
Patch 1163135 by Bryan Vandyke: Remove trailing spaces for ID3v2 tags
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6885 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | docs/CREDITS | 1 | ||||
| -rw-r--r-- | firmware/id3.c | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/docs/CREDITS b/docs/CREDITS index 5d3c845..6e04add 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -121,3 +121,4 @@ Ray Lambert Dave Wiard Pieter Bos Konstantin Isakov +Bryan Vandyke diff --git a/firmware/id3.c b/firmware/id3.c index 3a8296a..6a13de4 100644 --- a/firmware/id3.c +++ b/firmware/id3.c @@ -708,8 +708,12 @@ static void setid3v2title(int fd, struct mp3entry *entry) unicode_munge( ptag, &bytesread ); tag = *ptag; - tag[bytesread++] = 0; - bufferpos += bytesread; + /* remove trailing spaces */ + while ( bytesread > 0 && isspace(tag[bytesread-1])) + bytesread--; + tag[bytesread] = 0; + bufferpos += bytesread + 1; + if( tr->ppFunc ) bufferpos = tr->ppFunc(entry, tag, bufferpos); break; |