summaryrefslogtreecommitdiff
path: root/saveload.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-07-20 15:36:22 +0000
committerDarkvater <Darkvater@openttd.org>2005-07-20 15:36:22 +0000
commitc1f63a289ad11697fd3e26edb7c1e954df507941 (patch)
tree0a6894a93f374b28955799009bb0fb37d2c0fad4 /saveload.c
parentf09638ad3d3eaf3574086e351a56bf5c14159894 (diff)
downloadopenttd-c1f63a289ad11697fd3e26edb7c1e954df507941.tar.xz
(svn r2651) - Fix: [ 1220776 ] Removes warning when compiling saveload.c on some GCC versions (glx). This only works as long as there is only 1 saving thread active, as is the case now.
Diffstat (limited to 'saveload.c')
-rw-r--r--saveload.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/saveload.c b/saveload.c
index fdc4d5847..1e6526d7a 100644
--- a/saveload.c
+++ b/saveload.c
@@ -1235,9 +1235,11 @@ static bool SaveFileToDisk(void *ptr)
const SaveLoadFormat *fmt = GetSavegameFormat(_savegame_format);
/* XXX - backup _sl.buf cause it is used internally by the writer
* and we update it for our own purposes */
- byte *tmp = _sl.buf;
+ static byte *tmp = NULL;
uint32 hdr[2];
+ tmp = _sl.buf;
+
SaveFileStart();
/* XXX - Setup setjmp error handler if an error occurs anywhere deep during