diff --git a/changelog.txt b/changelog.txt index b619bf6c..cd8fcfd8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ ---version 2.0.2 released--- -11-aug-2008 - zeromus - SF [ 2046985 ] SRAM not wiped on power cycle (during movies) +12-aug-2008 - zeromus - print a special message when trying to open an FCM reminding user to convert. (finishes SF [ 2011832 ] Opening non movie file crashes FCEUX) +12-aug-2008 - zeromus - SF [ 2046985 ] SRAM not wiped on power cycle (during movies) 11-aug-2008 - zeromus - restore IPS patching capability which was lost when archive support was added 11-aug-2008 - zeromus - SF [ 2011550 ] Buffer overflow (change vsprintf to vsnprintf) 11-aug-2008 - zeromus - SF [ 2047004 ] Moviefilenames without extension don't automatically get fm2 diff --git a/src/movie.cpp b/src/movie.cpp index 899028f7..e28330a9 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -461,9 +461,19 @@ static void LoadFM2_binarychunk(MovieData& movieData, std::istream* fp, int size //yuck... another custom text parser. static bool LoadFM2(MovieData& movieData, std::istream* fp, int size, bool stopAfterHeader) { + //first, look for an fcm signature + char fcmbuf[3]; + std::ios::pos_type curr = fp->tellg(); + fp->read(fcmbuf,3); + fp->seekg(curr); + if(!strncmp(fcmbuf,"FCM",3)) { + FCEU_PrintError("FCM File format is no longer supported. Please use Tools > Convert FCM"); + return false; + } + //movie must start with "version 3" char buf[9]; - std::ios::pos_type curr = fp->tellg(); + curr = fp->tellg(); fp->read(buf,9); fp->seekg(curr); if(fp->fail()) return false;