summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-04-25 17:14:59 +0200
committerGravatar waker <wakeroid@gmail.com>2011-04-25 17:14:59 +0200
commitcdd1591c104d23ac40ee5880b8d99c00df46aff9 (patch)
tree46eba0ea129d91f4e3cc014e1e21107bc6410252 /playlist.c
parent5e057571477278c38c48e9cfb3b426b274f6e1a1 (diff)
allow unquoted single-word strings in cuesheets
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/playlist.c b/playlist.c
index c8f4ac53..4535c296 100644
--- a/playlist.c
+++ b/playlist.c
@@ -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;