From de4699a97e40bef9ac00bce397f2f1f7190d93e8 Mon Sep 17 00:00:00 2001 From: withmorten Date: Mon, 28 Jun 2021 18:14:15 +0200 Subject: fix no VALIDATE_SAVE_SIZE build --- src/save/SaveBuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/save') diff --git a/src/save/SaveBuf.h b/src/save/SaveBuf.h index 1ca0066a..de27017e 100644 --- a/src/save/SaveBuf.h +++ b/src/save/SaveBuf.h @@ -111,5 +111,5 @@ WriteSaveBuf(uint8 *&buf, uint32 &length, const T &value) } while(0) #else #define CheckSaveHeader(buf, a, b, c, d, size) SkipSaveBuf(buf, 8); -#define CheckSaveHeaderWithLength(buf, a, b, c, d, size) SkipSaveBuf(buf, 8); +#define CheckSaveHeaderWithLength(buf, len, a, b, c, d, size) SkipSaveBuf(buf, 8); #endif -- cgit v1.2.3 From abe57fefa01d60aff49cd1e0182e549a8c1bbc8d Mon Sep 17 00:00:00 2001 From: withmorten Date: Wed, 30 Jun 2021 16:28:07 +0200 Subject: fix some string sizes to be MAX_PATH --- src/save/GenericGameStorage.cpp | 4 ++++ src/save/PCSave.cpp | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src/save') diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index a97e9af7..84ab118c 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -540,7 +540,11 @@ GetNameOfSavedGame(int32 slot) bool CheckDataNotCorrupt(int32 slot, char *name) { +#ifdef FIX_BUGS + char filename[MAX_PATH]; +#else char filename[100]; +#endif int32 blocknum = 0; eLevelName level = LEVEL_GENERIC; diff --git a/src/save/PCSave.cpp b/src/save/PCSave.cpp index 70ca31d2..c9045705 100644 --- a/src/save/PCSave.cpp +++ b/src/save/PCSave.cpp @@ -25,7 +25,11 @@ C_PcSave::SetSaveDirectory(const char *path) bool C_PcSave::DeleteSlot(int32 slot) { +#ifdef FIX_BUGS + char FileName[MAX_PATH]; +#else char FileName[200]; +#endif PcSaveHelper.nErrorCode = SAVESTATUS_SUCCESSFUL; sprintf(FileName, "%s%i.b", DefaultPCSaveFileName, slot + 1); -- cgit v1.2.3