goto readerr;
struct cd_toc_head *toc = &ttoc;
if (strack < toc->first_track || strack > toc->last_track ||
- etrack < toc->first_track || etrack > toc->last_track ||
- strack > etrack)
+ etrack < toc->first_track || strack > etrack)
goto errreq;
int start = toc->toc[toc->first_track_offset + strack - 1].paddress;
- int end = etrack == toc->last_track ? toc->lastaddress : toc->toc[toc->first_track_offset + etrack - 1 + 1].paddress;
+ int end = etrack >= toc->last_track ? toc->lastaddress : toc->toc[toc->first_track_offset + etrack - 1 + 1].paddress;
sys_command_cd_pause (unitnum, 0);
if (!sys_command_cd_play (unitnum, start, end, 0))
goto wrongtracktype;