From fabce282db322c620511f147ec2b62388429c1c2 Mon Sep 17 00:00:00 2001 From: OV2 Date: Sat, 3 Dec 2016 17:39:43 +0100 Subject: [PATCH] win32: use local copy of filename, msu loading calls S9xGetFilename --- win32/wsnes9x.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 2746bd7b..b4de0412 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -3704,7 +3704,7 @@ loop_exit: void FreezeUnfreeze (int slot, bool8 freeze) { - const char *filename; + char filename[_MAX_PATH +1]; char ext [_MAX_EXT + 1]; #ifdef NETPLAY_SUPPORT @@ -3717,7 +3717,7 @@ void FreezeUnfreeze (int slot, bool8 freeze) #endif snprintf(ext, _MAX_EXT, ".%03d", slot); - filename = S9xGetFilename(ext,SNAPSHOT_DIR); + strcpy(filename, S9xGetFilename(ext, SNAPSHOT_DIR)); S9xSetPause (PAUSE_FREEZE_FILE);