summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-04-02 18:50:56 +0200
committerGravatar waker <wakeroid@gmail.com>2012-04-02 18:52:04 +0200
commitb546cdfecc077961205728e4be0af72c23a9d53d (patch)
tree0fa04f8e1c6d870bc3d4e0fe0425577607232ac1
parent7ca65607dcd1d304dbd5abce0d782a5caf26c304 (diff)
fixed bug in id3v2 parser which wasn't trimming whitespace correctly at the end of text fields
-rw-r--r--junklib.c2
-rw-r--r--plugins/m3u/m3u.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/junklib.c b/junklib.c
index a23cea65..d91f4060 100644
--- a/junklib.c
+++ b/junklib.c
@@ -736,7 +736,7 @@ convstr_id3v2 (int version, uint8_t encoding, const unsigned char* str, int sz)
}
// trim trailing linebreaks
for (n = converted_sz-1; n >= 0; n--) {
- if (out[n] == '\n') {
+ if ((uint8_t)out[n] <= 32) {
out[n] = 0;
}
else {
diff --git a/plugins/m3u/m3u.c b/plugins/m3u/m3u.c
index 189d2b28..8097698c 100644
--- a/plugins/m3u/m3u.c
+++ b/plugins/m3u/m3u.c
@@ -120,6 +120,7 @@ load_m3u (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname, int *pab
strncpy (title, c, sizeof (title)-1);
title[sizeof(title)-1] = 0;
}
+ trace ("title: %s, artist: %s\n", title, artist);
}
}
}