diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/cuesheet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c index a9169d4494..98040f9992 100644 --- a/apps/cuesheet.c +++ b/apps/cuesheet.c | |||
@@ -123,6 +123,7 @@ static unsigned long parse_cue_index(const char *line) | |||
123 | /* assumes strncmp(line, "INDEX 01", 8) & NULL terminated string */ | 123 | /* assumes strncmp(line, "INDEX 01", 8) & NULL terminated string */ |
124 | /* INDEX 01 MM:SS:FF\0 (00:00:00\0 - 99:99:99\0)*/ | 124 | /* INDEX 01 MM:SS:FF\0 (00:00:00\0 - 99:99:99\0)*/ |
125 | const unsigned field_m[3] = {60 * 1000, 1000, 13}; /* MM:SS:~FF*/ | 125 | const unsigned field_m[3] = {60 * 1000, 1000, 13}; /* MM:SS:~FF*/ |
126 | const unsigned field_max[3] = {30000, 59, 74}; /* MM, SS, FF */ | ||
126 | const char f_sep = ':'; | 127 | const char f_sep = ':'; |
127 | int field = -1; | 128 | int field = -1; |
128 | unsigned long offset = 0; /* ms from start of track */ | 129 | unsigned long offset = 0; /* ms from start of track */ |
@@ -138,7 +139,7 @@ static unsigned long parse_cue_index(const char *line) | |||
138 | while (isdigit(*line)) | 139 | while (isdigit(*line)) |
139 | { | 140 | { |
140 | value = 10 * value + (*line - '0'); | 141 | value = 10 * value + (*line - '0'); |
141 | if (value > 99) /* Sanity check bail early */ | 142 | if (value > field_max[field]) /* Sanity check bail early */ |
142 | return 0; | 143 | return 0; |
143 | line++; | 144 | line++; |
144 | } | 145 | } |