[ 2047645 ] Creating a savestate object in Lua crashes FCEUX

This commit is contained in:
zeromus 2008-08-13 04:21:08 +00:00
parent 93c18133cb
commit 91147a80e0
1 changed files with 2 additions and 1 deletions

View File

@ -489,7 +489,8 @@ static int savestate_create(lua_State *L) {
filename = FCEU_MakeFName(FCEUMKF_STATE, which - 1, 0);
}
else {
filename = mktemp("snlua");
char tempbuf[100] = "snluaXXXXXX";
filename = mktemp(tempbuf);
}
// Our "object". We don't care about the type, we just need the memory and GC services.