From 1254aec80505bc95b6cd7f525683056a6ab2f49a Mon Sep 17 00:00:00 2001 From: James Alan Nguyen Date: Thu, 12 May 2022 11:00:25 +1000 Subject: [PATCH] Fix GYBv3 load with safer offset load --- src/engine/fileOpsIns.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index b26cc67d6..4f08fea62 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -1201,6 +1201,7 @@ void DivEngine::loadGYB(SafeReader& reader, std::vector& ret, St if (!reader.seek(patchPosOffset + patchSize, SEEK_SET)) { throw EndOfFileException(&reader, patchPosOffset + patchSize); } + patchPosOffset = reader.tell(); } } reader.seek(0, SEEK_END);