mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +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
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user