summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-01-29 22:42:17 +0000
committertruelight <truelight@openttd.org>2006-01-29 22:42:17 +0000
commitb7beb3d87d68e6a6846a1c88d704763f824125a6 (patch)
treed6767799005b7d2327a52b94dc1bd0bd27ba1cfa
parente6d16d17dc79d63b8ecb33bec0746cdd69287f36 (diff)
downloadopenttd-b7beb3d87d68e6a6846a1c88d704763f824125a6.tar.xz
(svn r3483) -Fix: fixed warning about setjmp (tnx Bjarni for testing, and tnx for
taking the effort to commit it)
-rw-r--r--saveload.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/saveload.c b/saveload.c
index 8e00bcfcd..5e0988a60 100644
--- a/saveload.c
+++ b/saveload.c
@@ -1290,7 +1290,7 @@ static Thread* save_thread;
*/
static void* SaveFileToDisk(void *arg)
{
- const SaveLoadFormat *fmt = GetSavegameFormat(_savegame_format);
+ const SaveLoadFormat *fmt;
uint32 hdr[2];
if (arg != NULL) OTTD_SendThreadMessage(MSG_OTTD_SAVETHREAD_START);
@@ -1307,6 +1307,8 @@ static void* SaveFileToDisk(void *arg)
return NULL;
}
+ fmt = GetSavegameFormat(_savegame_format);
+
/* We have written our stuff to memory, now write it to file! */
hdr[0] = fmt->tag;
hdr[1] = TO_BE32(SAVEGAME_VERSION << 16);