summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.cpp
diff options
context:
space:
mode:
authorwithmorten <morten.with@gmail.com>2021-07-19 23:39:56 +0200
committerwithmorten <morten.with@gmail.com>2021-07-19 23:44:01 +0200
commit76558e9313c481c39f40b2c73c4a3f68bf560d4e (patch)
tree9141c848e70fc05b566bed9a495d61d3ae1b16ce /src/control/Garages.cpp
parentrender -> renderer (original name) (diff)
downloadre3-76558e9313c481c39f40b2c73c4a3f68bf560d4e.tar
re3-76558e9313c481c39f40b2c73c4a3f68bf560d4e.tar.gz
re3-76558e9313c481c39f40b2c73c4a3f68bf560d4e.tar.bz2
re3-76558e9313c481c39f40b2c73c4a3f68bf560d4e.tar.lz
re3-76558e9313c481c39f40b2c73c4a3f68bf560d4e.tar.xz
re3-76558e9313c481c39f40b2c73c4a3f68bf560d4e.tar.zst
re3-76558e9313c481c39f40b2c73c4a3f68bf560d4e.zip
Diffstat (limited to '')
-rw-r--r--src/control/Garages.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index d7394902..34ed11eb 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -2259,6 +2259,9 @@ void CGarages::Save(uint8 * buf, uint32 * size)
//INITSAVEBUF
*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));
+#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);