summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-07-24 00:02:23 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-07-24 00:02:23 +0200
commitdc729009ac22697406a42c8fddcdf6b470ef8e11 (patch)
treed8682cbb8d3a05410f9530f016ab712a4d37e3d5 /src/control
parentfix (diff)
parentMerge branch 'miami' into lcs (diff)
downloadre3-dc729009ac22697406a42c8fddcdf6b470ef8e11.tar
re3-dc729009ac22697406a42c8fddcdf6b470ef8e11.tar.gz
re3-dc729009ac22697406a42c8fddcdf6b470ef8e11.tar.bz2
re3-dc729009ac22697406a42c8fddcdf6b470ef8e11.tar.lz
re3-dc729009ac22697406a42c8fddcdf6b470ef8e11.tar.xz
re3-dc729009ac22697406a42c8fddcdf6b470ef8e11.tar.zst
re3-dc729009ac22697406a42c8fddcdf6b470ef8e11.zip
Diffstat (limited to 'src/control')
-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 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);