mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2025-02-18 19:16:21 +01:00
fix garbage data written in garage save block
This commit is contained in:
parent
c937bdbfea
commit
76558e9313
@ -2259,6 +2259,9 @@ void CGarages::Save(uint8 * buf, uint32 * size)
|
|||||||
//INITSAVEBUF
|
//INITSAVEBUF
|
||||||
*size = 7876; // for some reason it's not actual size again
|
*size = 7876; // for some reason it's not actual size again
|
||||||
//*size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage));
|
//*size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage));
|
||||||
|
#if !defined THIS_IS_STUPID && defined COMPATIBLE_SAVES
|
||||||
|
memset(buf + 7340, 0, *size - 7340); // garbage data is written otherwise
|
||||||
|
#endif
|
||||||
CloseHideOutGaragesBeforeSave();
|
CloseHideOutGaragesBeforeSave();
|
||||||
WriteSaveBuf(buf, NumGarages);
|
WriteSaveBuf(buf, NumGarages);
|
||||||
WriteSaveBuf(buf, (uint32)BombsAreFree);
|
WriteSaveBuf(buf, (uint32)BombsAreFree);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user