(svn r3483) -Fix: fixed warning about setjmp (tnx Bjarni for testing, and tnx for

taking the effort to commit it)
This commit is contained in:
truelight 2006-01-29 22:42:17 +00:00
parent e6d16d17dc
commit b7beb3d87d
1 changed files with 3 additions and 1 deletions

View File

@ -1290,7 +1290,7 @@ static Thread* save_thread;
*/ */
static void* SaveFileToDisk(void *arg) static void* SaveFileToDisk(void *arg)
{ {
const SaveLoadFormat *fmt = GetSavegameFormat(_savegame_format); const SaveLoadFormat *fmt;
uint32 hdr[2]; uint32 hdr[2];
if (arg != NULL) OTTD_SendThreadMessage(MSG_OTTD_SAVETHREAD_START); if (arg != NULL) OTTD_SendThreadMessage(MSG_OTTD_SAVETHREAD_START);
@ -1307,6 +1307,8 @@ static void* SaveFileToDisk(void *arg)
return NULL; return NULL;
} }
fmt = GetSavegameFormat(_savegame_format);
/* We have written our stuff to memory, now write it to file! */ /* We have written our stuff to memory, now write it to file! */
hdr[0] = fmt->tag; hdr[0] = fmt->tag;
hdr[1] = TO_BE32(SAVEGAME_VERSION << 16); hdr[1] = TO_BE32(SAVEGAME_VERSION << 16);