浏览代码

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>
master
Dmitry Smirnov 11 年前
父节点
当前提交
e74f095fe1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/lib/cd.c

+ 2
- 2
src/lib/cd.c 查看文件

@@ -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");


正在加载...
取消
保存