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
commit32b6f9e618330075c9712589b25d7e20a42652cc (patch)
treed6767799005b7d2327a52b94dc1bd0bd27ba1cfa
parent25c7e1fe340a7060023d91dad057875b266648cb (diff)
downloadopenttd-32b6f9e618330075c9712589b25d7e20a42652cc.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);