mirror of
https://github.com/halpz/re3.git
synced 2025-07-23 22:49:45 +00:00
fix garbage data written in garage save block
This commit is contained in:
@ -2305,6 +2305,9 @@ void CGarages::Save(uint8 * buf, uint32 * size)
|
||||
*size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + 3 * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage));
|
||||
#else
|
||||
* size = 5484;
|
||||
#endif
|
||||
#if !defined THIS_IS_STUPID && !defined FIX_GARAGE_SIZE && defined COMPATIBLE_SAVES
|
||||
memset(buf + 5240, 0, *size - 5240); // garbage data is written otherwise
|
||||
#endif
|
||||
CloseHideOutGaragesBeforeSave();
|
||||
WriteSaveBuf(buf, NumGarages);
|
||||
|
Reference in New Issue
Block a user