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
This commit is contained in:
Jonas Häggqvist 2005-06-26 22:43:57 +00:00
parent ba5f9cf181
commit e021e1f42c
2 changed files with 7 additions and 2 deletions

View file

@ -121,3 +121,4 @@ Ray Lambert
Dave Wiard
Pieter Bos
Konstantin Isakov
Bryan Vandyke

View file

@ -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;