X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fcdriso.c;fp=libpcsxcore%2Fcdriso.c;h=f47fcfddc8d4e834320f45bfa2546e1f3b945e3b;hp=3189579494b4c9edfaf3467bdceb6f1d97012489;hb=cbd88286c7e8473e1062fbe740ec59a302031531;hpb=7e6d030e6da39c49b51cbdb2e9cf3feb0a2b9a56 diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 31895794..f47fcfdd 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -110,7 +110,7 @@ struct trackinfo { char start[3]; // MSF-format char length[3]; // MSF-format FILE *handle; // for multi-track images CDDA - unsigned int start_offset; // byte offset from start of above file + unsigned int start_offset; // byte offset from start of above file (chd: sector offset) }; #define MAXTRACKS 100 /* How many tracks can a CD hold? */ @@ -1229,7 +1229,7 @@ static int cdread_chd(FILE *f, unsigned int base, void *dest, int sector) { int hunk; - assert(base == 0); + sector += base; hunk = sector / chd_img->sectors_per_hunk; chd_img->sector_in_hunk = sector % chd_img->sectors_per_hunk;