Use hunksize from chd instead of header constant

This commit is contained in:
Zakk
2024-03-12 19:31:10 -04:00
parent 40501a8775
commit 3a0d20577e
7 changed files with 9 additions and 7 deletions

View File

@@ -301,7 +301,7 @@ static const char* load_chd_file(drive_t *drv, const char *chdfile)
free(drv->chd_hunkbuf);
}
drv->chd_hunkbuf = (uint8_t *)malloc(CD_FRAME_SIZE * CD_FRAMES_PER_HUNK);
drv->chd_hunkbuf = (uint8_t *)malloc(tmpTOC.chd_hunksize);
drv->chd_hunknum = -1;
drv->chd_f = tmpTOC.chd_f;