fix: MxDSFile::Open is now matching 100% (#69)

This commit is contained in:
Kai Kaufman 2023-07-02 03:51:57 -04:00 committed by GitHub
parent 646b39e876
commit b91c7d436b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,16 +23,15 @@ MxDSFile::~MxDSFile()
// OFFSET: LEGO1 0x100cc590 // OFFSET: LEGO1 0x100cc590
long MxDSFile::Open(unsigned long uStyle) long MxDSFile::Open(unsigned long uStyle)
{ {
// No idea what's stopping this one matching, but I'm pretty MXIOINFO& io = m_io;
// confident it has the correct behavior.
long longResult = 1; long longResult = 1;
memset(&m_io, 0, sizeof(MXIOINFO)); memset(&io, 0, sizeof(MXIOINFO));
if (m_io.Open(m_filename.GetData(), uStyle) != 0) { if (io.Open(m_filename.GetData(), uStyle) != 0) {
return -1; return -1;
} }
m_io.SetBuffer(NULL, 0, 0); io.SetBuffer(NULL, 0, 0);
m_position = 0; m_position = 0;
if (m_skipReadingChunks == 0) { if (m_skipReadingChunks == 0) {