mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-16 02:43:40 +00:00
Use sizeof(type) instead of sizeof(variableName) when (de)serializing data (#1505)
* Use sizeof(type) instead of sizeof(variableName) when (de)serializing data * Less usage of sizeof(variableName) while (de)serializing
This commit is contained in:
committed by
GitHub
parent
c9b41e2db8
commit
2915aa014f
@@ -142,25 +142,25 @@ MxResult LegoAnimPresenter::CreateAnim(MxStreamChunk* p_chunk)
|
||||
LegoS32 parseScene = 0;
|
||||
MxS32 val3;
|
||||
|
||||
if (storage.Read(&magicSig, sizeof(magicSig)) != SUCCESS || magicSig != 0x11) {
|
||||
if (storage.Read(&magicSig, sizeof(MxS32)) != SUCCESS || magicSig != 0x11) {
|
||||
goto done;
|
||||
}
|
||||
if (storage.Read(&m_unk0xa4, sizeof(m_unk0xa4)) != SUCCESS) {
|
||||
if (storage.Read(&m_unk0xa4, sizeof(float)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (storage.Read(&m_unk0xa8[0], sizeof(m_unk0xa8[0])) != SUCCESS) {
|
||||
if (storage.Read(&m_unk0xa8[0], sizeof(float)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (storage.Read(&m_unk0xa8[1], sizeof(m_unk0xa8[1])) != SUCCESS) {
|
||||
if (storage.Read(&m_unk0xa8[1], sizeof(float)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (storage.Read(&m_unk0xa8[2], sizeof(m_unk0xa8[2])) != SUCCESS) {
|
||||
if (storage.Read(&m_unk0xa8[2], sizeof(float)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (storage.Read(&parseScene, sizeof(parseScene)) != SUCCESS) {
|
||||
if (storage.Read(&parseScene, sizeof(LegoS32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (storage.Read(&val3, sizeof(val3)) != SUCCESS) {
|
||||
if (storage.Read(&val3, sizeof(MxS32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user