(svn r3483) -Fix: fixed warning about setjmp (tnx Bjarni for testing, and tnx for
authortruelight
Sun, 29 Jan 2006 22:42:17 +0000
changeset 2927 15690f1a9bb8
parent 2926 d503d725d7d4
child 2928 414b96d4d4fb
(svn r3483) -Fix: fixed warning about setjmp (tnx Bjarni for testing, and tnx for
taking the effort to commit it)
saveload.c
--- a/saveload.c	Sun Jan 29 22:40:51 2006 +0000
+++ b/saveload.c	Sun Jan 29 22:42:17 2006 +0000
@@ -1290,7 +1290,7 @@
  */
 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 @@
 		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);