From eacebb681eab020b1b27caaf07440a2dbeb878ca Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Mon, 16 Dec 2024 13:58:22 -0700 Subject: [PATCH] Fix syntax --- LEGO1/modeldb/modeldb.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/LEGO1/modeldb/modeldb.cpp b/LEGO1/modeldb/modeldb.cpp index 2ac3f978..c56e62b7 100644 --- a/LEGO1/modeldb/modeldb.cpp +++ b/LEGO1/modeldb/modeldb.cpp @@ -52,8 +52,11 @@ MxResult ModelDbModel::Read(FILE* p_file) if (fread(&m_up, sizeof(*m_up), 3, p_file) != 3) { return FAILURE; } + if (fread(&m_unk0x34, sizeof(m_unk0x34), 1, p_file) != 1) { + return FAILURE; + } - return fread(&m_unk0x34, sizeof(m_unk0x34), 1, p_file) == 1 ? SUCCESS : FAILURE; + return SUCCESS; } // FUNCTION: LEGO1 0x10027850 @@ -76,8 +79,11 @@ MxResult ModelDbPart::Read(FILE* p_file) if (fread(&m_partDataLength, sizeof(m_partDataLength), 1, p_file) != 1) { return FAILURE; } + if (fread(&m_partDataOffset, sizeof(m_partDataOffset), 1, p_file) != 1) { + return FAILURE; + } - return fread(&m_partDataOffset, sizeof(m_partDataOffset), 1, p_file) == 1 ? SUCCESS : FAILURE; + return SUCCESS; } // FUNCTION: LEGO1 0x10027910