# HG changeset patch # User truelight # Date 1138574537 0 # Node ID 20bdea584ca5b0e876f7cf5cdf0c5ed75e745993 # Parent 86300d12e34da6eeb7c3e2f816ff997ddd792f38 (svn r3483) -Fix: fixed warning about setjmp (tnx Bjarni for testing, and tnx for taking the effort to commit it) diff --git a/saveload.c b/saveload.c --- a/saveload.c +++ b/saveload.c @@ -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);