summaryrefslogtreecommitdiff
path: root/firmware/id3.c
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2005-06-26 22:43:57 +0000
committerJonas Häggqvist <rasher@rasher.dk>2005-06-26 22:43:57 +0000
commite021e1f42c817bf36b0ad84ffff1df797cbfa077 (patch)
tree2692db9910ddb326789a90566b950043c86d7049 /firmware/id3.c
parentba5f9cf181ee90052dc59934fbc3c664e661b325 (diff)
downloadrockbox-e021e1f42c817bf36b0ad84ffff1df797cbfa077.tar.gz
rockbox-e021e1f42c817bf36b0ad84ffff1df797cbfa077.zip
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
Diffstat (limited to 'firmware/id3.c')
-rw-r--r--firmware/id3.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index 3a8296a8ae..6a13de4e29 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -708,8 +708,12 @@ static void setid3v2title(int fd, struct mp3entry *entry)
708 708
709 unicode_munge( ptag, &bytesread ); 709 unicode_munge( ptag, &bytesread );
710 tag = *ptag; 710 tag = *ptag;
711 tag[bytesread++] = 0; 711 /* remove trailing spaces */
712 bufferpos += bytesread; 712 while ( bytesread > 0 && isspace(tag[bytesread-1]))
713 bytesread--;
714 tag[bytesread] = 0;
715 bufferpos += bytesread + 1;
716
713 if( tr->ppFunc ) 717 if( tr->ppFunc )
714 bufferpos = tr->ppFunc(entry, tag, bufferpos); 718 bufferpos = tr->ppFunc(entry, tag, bufferpos);
715 break; 719 break;