diff options
author | waker <wakeroid@gmail.com> | 2011-04-25 17:14:59 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-04-25 17:14:59 +0200 |
commit | cdd1591c104d23ac40ee5880b8d99c00df46aff9 (patch) | |
tree | 46eba0ea129d91f4e3cc014e1e21107bc6410252 /playlist.c | |
parent | 5e057571477278c38c48e9cfb3b426b274f6e1a1 (diff) |
allow unquoted single-word strings in cuesheets
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -726,21 +726,28 @@ pl_get_qvalue_from_cue (const uint8_t *p, int sz, char *out) { *out = 0; return; } - // seek " - while (*p && *p != '"') { - p++; - } + p = pl_cue_skipspaces (p); if (*p == 0) { *out = 0; return; } - p++; - p = pl_cue_skipspaces (p); - while (*p && *p != '"' && sz > 1) { - sz--; - *out++ = *p++; + + if (*p == '"') { + p++; + p = pl_cue_skipspaces (p); + while (*p && *p != '"' && sz > 1) { + sz--; + *out++ = *p++; + } + *out = 0; + } + else { + while (*p && *p > 0x20) { + sz--; + *out++ = *p++; + } + *out = 0; } - *out = 0; const char *charset = junk_detect_charset (str); if (!charset) { return; |