From 87ffcf2b2730735396cb3faed0073aab60dc1814 Mon Sep 17 00:00:00 2001 From: James Alan Nguyen Date: Mon, 9 May 2022 21:15:26 +1000 Subject: [PATCH] Adjust seek-ends since exact data reads should be correct. --- src/engine/fileOpsIns.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index a8e1b126f..491807fac 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -730,10 +730,12 @@ void DivEngine::loadOPLI(SafeReader& reader, std::vector& ret, S readOpliOp(reader, ins->fm.op[i]); } } + + if (!is_2x2op) { + reader.seek(10, SEEK_CUR); // skip unused operator pair + } } - // Skip rest of file - reader.seek(0, SEEK_END); insList.push_back(ins); } } catch (EndOfFileException& e) { @@ -809,8 +811,6 @@ void DivEngine::loadOPNI(SafeReader& reader, std::vector& ret, S readOpniOp(reader, ins->fm.op[i]); } - // Skip rest of file - reader.seek(0, SEEK_END); ret.push_back(ins); } } catch (EndOfFileException& e) {