From b91c7d436babc48b812f6e2874072afc67ef52ea Mon Sep 17 00:00:00 2001 From: Kai Kaufman <92912278+ktkaufman03@users.noreply.github.com> Date: Sun, 2 Jul 2023 03:51:57 -0400 Subject: [PATCH] fix: MxDSFile::Open is now matching 100% (#69) --- LEGO1/mxdsfile.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/LEGO1/mxdsfile.cpp b/LEGO1/mxdsfile.cpp index 327fab46..3e587b07 100644 --- a/LEGO1/mxdsfile.cpp +++ b/LEGO1/mxdsfile.cpp @@ -23,16 +23,15 @@ MxDSFile::~MxDSFile() // OFFSET: LEGO1 0x100cc590 long MxDSFile::Open(unsigned long uStyle) { - // No idea what's stopping this one matching, but I'm pretty - // confident it has the correct behavior. + MXIOINFO& io = m_io; 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; } - m_io.SetBuffer(NULL, 0, 0); + io.SetBuffer(NULL, 0, 0); m_position = 0; if (m_skipReadingChunks == 0) {