diff options
-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 |