Fix GYBv3 load with safer offset load

This commit is contained in:
James Alan Nguyen 2022-05-12 11:00:25 +10:00
parent 63d2e12c27
commit 1254aec805
1 changed files with 1 additions and 0 deletions

View File

@ -1201,6 +1201,7 @@ void DivEngine::loadGYB(SafeReader& reader, std::vector<DivInstrument*>& ret, St
if (!reader.seek(patchPosOffset + patchSize, SEEK_SET)) {
throw EndOfFileException(&reader, patchPosOffset + patchSize);
}
patchPosOffset = reader.tell();
}
}
reader.seek(0, SEEK_END);