diff --git a/src/state.cpp b/src/state.cpp index 503622b1..a40e665e 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -1103,7 +1103,7 @@ string GetBackupFileName() string filename; int x; - filename = strdup(FCEU_MakeFName(FCEUMKF_STATE,CurrentState,0).c_str()); //Generate normal savestate filename + filename = FCEU_MakeFName(FCEUMKF_STATE,CurrentState,0); //Generate normal savestate filename x = filename.find_last_of("."); //Find last dot filename = filename.substr(0,x); //Chop off file extension filename.append(".bak.fc0"); //add .bak