From 3de7413a368e99aba10d5ded042808abd279fb8a Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Tue, 26 Apr 2016 17:55:36 +1000 Subject: [PATCH] cuesheet.c: Allow quotes around ISRC field With this change, flac now accepts cuesheets where the ISRC field is enclosed in double quotes. Added a test for this as well. Closes: https://sourceforge.net/p/flac/bugs/436/ --- src/share/grabbag/cuesheet.c | 2 +- test/cuesheet.ok | 1 + test/cuesheets/good.005.quoted.isrc.cue | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 test/cuesheets/good.005.quoted.isrc.cue diff --git a/src/share/grabbag/cuesheet.c b/src/share/grabbag/cuesheet.c index a6e4c68c..40cc6c89 100644 --- a/src/share/grabbag/cuesheet.c +++ b/src/share/grabbag/cuesheet.c @@ -404,7 +404,7 @@ static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message, *error_message = "ISRC command must come after TRACK but before INDEX"; return false; } - if(0 == (field = local__get_field_(&line, /*allow_quotes=*/false))) { + if(0 == (field = local__get_field_(&line, /*allow_quotes=*/true))) { *error_message = "ISRC is missing ISRC number"; return false; } diff --git a/test/cuesheet.ok b/test/cuesheet.ok index c57f833a..dc9c82f0 100644 --- a/test/cuesheet.ok +++ b/test/cuesheet.ok @@ -91,3 +91,4 @@ POSITIVE cuesheets/good.001.cue POSITIVE cuesheets/good.002.dos_format.cue POSITIVE cuesheets/good.003.missing_final_newline.cue POSITIVE cuesheets/good.004.dos_format.missing_final_newline.cue +POSITIVE cuesheets/good.005.quoted.isrc.cue diff --git a/test/cuesheets/good.005.quoted.isrc.cue b/test/cuesheets/good.005.quoted.isrc.cue new file mode 100644 index 00000000..3d8e9055 --- /dev/null +++ b/test/cuesheets/good.005.quoted.isrc.cue @@ -0,0 +1,6 @@ +TRACK 01 AUDIO +TITLE "Foo" +PERFORMER "Bar" +DISC_ID "" +ISRC "US-SM1-23-45678" +INDEX 01 00:00:00