win32: use local copy of filename, msu loading calls S9xGetFilename

This commit is contained in:
OV2 2016-12-03 17:39:43 +01:00
parent 2bd6fd867b
commit fabce282db
1 changed files with 2 additions and 2 deletions

View File

@ -3704,7 +3704,7 @@ loop_exit:
void FreezeUnfreeze (int slot, bool8 freeze) void FreezeUnfreeze (int slot, bool8 freeze)
{ {
const char *filename; char filename[_MAX_PATH +1];
char ext [_MAX_EXT + 1]; char ext [_MAX_EXT + 1];
#ifdef NETPLAY_SUPPORT #ifdef NETPLAY_SUPPORT
@ -3717,7 +3717,7 @@ void FreezeUnfreeze (int slot, bool8 freeze)
#endif #endif
snprintf(ext, _MAX_EXT, ".%03d", slot); snprintf(ext, _MAX_EXT, ".%03d", slot);
filename = S9xGetFilename(ext,SNAPSHOT_DIR); strcpy(filename, S9xGetFilename(ext, SNAPSHOT_DIR));
S9xSetPause (PAUSE_FREEZE_FILE); S9xSetPause (PAUSE_FREEZE_FILE);