mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 02:31:15 +00:00
Match
This commit is contained in:
parent
82de1453ed
commit
169d85e170
@ -188,8 +188,9 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
||||
}
|
||||
|
||||
ModelDbWorld* worlds = NULL;
|
||||
MxS32 numWorlds;
|
||||
MxS32 i, j;
|
||||
MxS32 numWorlds, i, j;
|
||||
MxU32 size;
|
||||
MxU8* buff;
|
||||
FILE* wdbFile = fopen(wdbPath, "rb");
|
||||
|
||||
if (wdbFile == NULL) {
|
||||
@ -209,12 +210,11 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
||||
}
|
||||
|
||||
if (g_wdbOffset == 0) {
|
||||
MxU32 size;
|
||||
if (fread(&size, sizeof(size), 1, wdbFile) != 1) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
MxU8* buff = new MxU8[size];
|
||||
buff = new MxU8[size];
|
||||
if (fread(buff, size, 1, wdbFile) != 1) {
|
||||
return FAILURE;
|
||||
}
|
||||
@ -229,7 +229,6 @@ MxResult LegoWorldPresenter::LoadWorld(char* p_worldName, LegoWorld* p_world)
|
||||
}
|
||||
|
||||
delete[] buff;
|
||||
// buff = NULL;
|
||||
|
||||
if (fread(&size, sizeof(size), 1, wdbFile) != 1) {
|
||||
return FAILURE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user