summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-11-30 19:55:19 +0100
committerGravatar waker <wakeroid@gmail.com>2012-11-30 19:55:19 +0100
commitb609cfd78902dc2a5c09068762354cdeba92529f (patch)
tree62d70edc95a0ddda336a9cab0ed521ebcf49de36 /playlist.c
parent45f89f789ae4730f1e2908565abae8f71c0afde8 (diff)
cue: fixed reading unquoted values with spaces
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/playlist.c b/playlist.c
index 424a5b49..c09f7284 100644
--- a/playlist.c
+++ b/playlist.c
@@ -840,10 +840,15 @@ pl_get_qvalue_from_cue (const uint8_t *p, int sz, char *out) {
*out = 0;
}
else {
- while (*p && *p > 0x20) {
+ while (*p && *p >= 0x20) {
sz--;
*out++ = *p++;
}
+ out--;
+ while (out > str && *out == 0x20) {
+ out--;
+ }
+ out++;
*out = 0;
}
const char *charset = junk_detect_charset (str);