From cad26b24bd9e6207570add640990ae083b702192 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Thu, 21 May 2009 09:53:41 +0000 Subject: [PATCH] Correct state restoring (it does something but still fails) --- src/gui-sdl/gui-sdl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui-sdl/gui-sdl.c b/src/gui-sdl/gui-sdl.c index a3a121f..35b04be 100644 --- a/src/gui-sdl/gui-sdl.c +++ b/src/gui-sdl/gui-sdl.c @@ -343,12 +343,12 @@ static void save_load_state(int which) if (!name) return; - snprintf(db, 255, "%s/%s", dir, name); if (which == 0) - restore_state(db); + restore_state(name); else - unlink(db); + unlink(name); + free(name); } break; case 1: /* Save state */ snprintf(db, 255, "%s/%s.sav", dir, fb);