Adjust seek-ends since exact data reads should be correct.

This commit is contained in:
James Alan Nguyen 2022-05-09 21:15:26 +10:00
parent ef4a60e095
commit 87ffcf2b27

View file

@ -730,10 +730,12 @@ void DivEngine::loadOPLI(SafeReader& reader, std::vector<DivInstrument*>& ret, S
readOpliOp(reader, ins->fm.op[i]); 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); insList.push_back(ins);
} }
} catch (EndOfFileException& e) { } catch (EndOfFileException& e) {
@ -809,8 +811,6 @@ void DivEngine::loadOPNI(SafeReader& reader, std::vector<DivInstrument*>& ret, S
readOpniOp(reader, ins->fm.op[i]); readOpniOp(reader, ins->fm.op[i]);
} }
// Skip rest of file
reader.seek(0, SEEK_END);
ret.push_back(ins); ret.push_back(ins);
} }
} catch (EndOfFileException& e) { } catch (EndOfFileException& e) {