diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-07-22 20:17:55 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-07-22 20:17:55 +0200 |
commit | cc13e31264730502d2055912d223a36d3733f9cd (patch) | |
tree | 50a7624c33e5c76158fd082a617e0db2854e8782 /src/control | |
parent | Merge branch 'miami' into lcs (diff) | |
parent | Possible fix of RemoveAndAdd crash (diff) | |
download | re3-cc13e31264730502d2055912d223a36d3733f9cd.tar re3-cc13e31264730502d2055912d223a36d3733f9cd.tar.gz re3-cc13e31264730502d2055912d223a36d3733f9cd.tar.bz2 re3-cc13e31264730502d2055912d223a36d3733f9cd.tar.lz re3-cc13e31264730502d2055912d223a36d3733f9cd.tar.xz re3-cc13e31264730502d2055912d223a36d3733f9cd.tar.zst re3-cc13e31264730502d2055912d223a36d3733f9cd.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Garages.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index cbf17be9..2c0bf8f2 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -2618,6 +2618,9 @@ void CGarages::Save(uint8 * buf, uint32 * size) //INITSAVEBUF *size = 10692; // 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)); +#if !defined THIS_IS_STUPID && defined COMPATIBLE_SAVES + memset(buf + 7340, 0, *size - 7340); // garbage data is written otherwise +#endif CloseHideOutGaragesBeforeSave(); WriteSaveBuf(buf, NumGarages); WriteSaveBuf(buf, (uint32)BombsAreFree); |