Skip to content

Commit b938511

Browse files
committed
Further protect against overlapping string copy by checking if pointers are different... just to be sure it is safe.
1 parent 26f623f commit b938511

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/movie.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,10 @@ static EMUFILE *openRecordingMovie(const char* fname)
807807
FCEU_PrintError("Error opening movie output file: %s", fname);
808808
return NULL;
809809
}
810-
curMovieFilename.assign(fname);
810+
if ( fname != curMovieFilename.c_str() )
811+
{
812+
curMovieFilename.assign(fname);
813+
}
811814

812815
return osRecordingMovie;
813816
}

0 commit comments

Comments
 (0)