From b609cfd78902dc2a5c09068762354cdeba92529f Mon Sep 17 00:00:00 2001 From: waker Date: Fri, 30 Nov 2012 19:55:19 +0100 Subject: cue: fixed reading unquoted values with spaces --- playlist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'playlist.c') 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); -- cgit v1.2.3