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

@@ -264,7 +264,7 @@ int pcecdd_t::Load(const char *filename)
this->chd_hunkbuf = NULL;
}
this->chd_hunkbuf = (uint8_t *)malloc(CD_FRAME_SIZE * CD_FRAMES_PER_HUNK);
this->chd_hunkbuf = (uint8_t *)malloc(this->toc.chd_hunksize);
this->chd_hunknum = -1;
} else {
return -1;