diff options
author | Darkvater <darkvater@openttd.org> | 2005-07-20 15:36:22 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-07-20 15:36:22 +0000 |
commit | 7da16dbf4b9fbb41f5aaad78162185dcc4a87b9c (patch) | |
tree | 0a6894a93f374b28955799009bb0fb37d2c0fad4 | |
parent | ac66e3e28f35c6939d3af68d1f0e26eb9b34e377 (diff) | |
download | openttd-7da16dbf4b9fbb41f5aaad78162185dcc4a87b9c.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.
-rw-r--r-- | saveload.c | 4 |
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 |