Fix structure access beyond its lifetime
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Mon, 29 Nov 2010 19:00:52 +0000 (19:00 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Mon, 29 Nov 2010 19:00:52 +0000 (19:00 +0000)
git-svn-id: https://s.snth.net/svn/neverball/trunk@3386 78b8d119-cf0a-0410-b17c-f493084dd1d7

ball/main.c

index f2a5d34..3db16bb 100644 (file)
@@ -477,7 +477,8 @@ int main(int argc, char *argv[])
 
         if (path)
         {
-            struct level level;
+            /* HACK: must be around for the duration of the game. */
+            static struct level level;
 
             if (level_load(path, &level))
             {