Skip to content

Commit

Permalink
Reject unknown MODE in CUE
Browse files Browse the repository at this point in the history
  • Loading branch information
kichikuou committed Aug 18, 2024
1 parent 7575f70 commit 3af0c02
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion shell/cdimage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,16 @@ class ImgCueReader implements Reader {
switch (fields[0]) {
case 'TRACK':
currentTrack = Number(fields[1]);
this.tracks[currentTrack] = { isAudio: fields[2] === 'AUDIO', index: [] };
switch (fields[2]) {
case 'MODE1/2352':
this.tracks[currentTrack] = { isAudio: false, index: [] };
break;
case 'AUDIO':
this.tracks[currentTrack] = { isAudio: true, index: [] };
break;
default:
throw new Error(`${cueFile.name}: Unknown track mode "${fields[2]}"`);
}
break;
case 'INDEX':
if (currentTrack)
Expand Down

0 comments on commit 3af0c02

Please sign in to comment.