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

@@ -209,7 +209,7 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
}
if (g_wdbOffset == 0) {
if (fread(&size, sizeof(size), 1, wdbFile) != 1) {
if (fread(&size, sizeof(MxU32), 1, wdbFile) != 1) {
return FAILURE;
}
@@ -229,7 +229,7 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
delete[] buff;
if (fread(&size, sizeof(size), 1, wdbFile) != 1) {
if (fread(&size, sizeof(MxU32), 1, wdbFile) != 1) {
return FAILURE;
}