summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwithmorten <morten.with@gmail.com>2021-06-30 16:28:07 +0200
committerwithmorten <morten.with@gmail.com>2021-06-30 16:28:07 +0200
commitabe57fefa01d60aff49cd1e0182e549a8c1bbc8d (patch)
tree556261a4ff73b169858fd56313d1913c88f2d4b0
parentd31a7e24a8a4a763aad5c7371d89fd6a12ccc0d6 (diff)
fix some string sizes to be MAX_PATH
-rw-r--r--src/save/GenericGameStorage.cpp4
-rw-r--r--src/save/PCSave.cpp4
2 files changed, 8 insertions, 0 deletions
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);