fix handling of cuesheets with 99 tracks (Debian #658818)
There's an off-by-one error in cd.c which causes cueprint to wrongly reject cuesheets with 99 tracks. Its actual limit is 98 tracks, and yet as the source code notes, the Red Book audio standard permits 99 tracks per disc (and 99 indices per track). . When I looked into this, I saw that: . 1) not only will the same error occur with index numbers, but 2) the wrong preprocessor symbol is being expanded when checking the index number Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658818 From: Branden Robinson <branden@debian.org> Author: Dmitry Smirnov <onlyjob@member.fsf.org>
This commit is contained in:
@@ -126,7 +126,7 @@ Cdtext *cd_get_cdtext(Cd *cd)
|
||||
|
||||
Track *cd_add_track(Cd *cd)
|
||||
{
|
||||
if (MAXTRACK - 1 > cd->ntrack) {
|
||||
if (MAXTRACK > cd->ntrack) {
|
||||
cd->ntrack++;
|
||||
} else {
|
||||
fprintf(stderr, "too many tracks\n");
|
||||
@@ -266,7 +266,7 @@ Cdtext *track_get_cdtext(Track *track)
|
||||
|
||||
void track_add_index(Track *track, long index)
|
||||
{
|
||||
if (MAXTRACK - 1 > track->nindex) {
|
||||
if (MAXINDEX > track->nindex) {
|
||||
track->nindex++;
|
||||
} else {
|
||||
fprintf(stderr, "too many indexes\n");
|
||||
|
||||
Reference in New Issue
Block a user