From 6f103a3b8246ed4a883abaea63c6682cdefc6752 Mon Sep 17 00:00:00 2001 From: withmorten Date: Wed, 7 Jul 2021 17:34:02 +0200 Subject: finish COMPATIBLE_SAVES and FIX_INCOMPATIBLE_SAVES --- src/save/SaveBuf.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/save/SaveBuf.h') diff --git a/src/save/SaveBuf.h b/src/save/SaveBuf.h index 6e9b3ae9..d0817e9a 100644 --- a/src/save/SaveBuf.h +++ b/src/save/SaveBuf.h @@ -64,6 +64,14 @@ WriteSaveBuf(uint8 *&buf, uint32 &length, const T &value) return p; } +#ifdef COMPATIBLE_SAVES +inline void +ZeroSaveBuf(uint8 *&buf, uint32 length) +{ + memset(buf, 0, length); + SkipSaveBuf(buf, length); +} +#endif #define SAVE_HEADER_SIZE (4*sizeof(char)+sizeof(uint32)) -- cgit v1.2.3