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:
Anonymous Maarten
2025-05-18 22:56:28 +02:00
committed by GitHub
parent c9b41e2db8
commit 2915aa014f
27 changed files with 227 additions and 234 deletions

View File

@@ -513,7 +513,7 @@ MxS32 LegoGameState::ReadVariable(LegoStorage* p_storage, MxVariableTable* p_to)
MxS32 result = 1;
MxU8 len;
if (p_storage->Read(&len, sizeof(len)) != SUCCESS) {
if (p_storage->Read(&len, sizeof(MxU8)) != SUCCESS) {
goto done;
}
@@ -531,7 +531,7 @@ MxS32 LegoGameState::ReadVariable(LegoStorage* p_storage, MxVariableTable* p_to)
goto done;
}
if (p_storage->Read(&len, sizeof(len)) != SUCCESS) {
if (p_storage->Read(&len, sizeof(MxU8)) != SUCCESS) {
goto done;
}