diff --git a/src/movie.cpp b/src/movie.cpp index bbcf8a48..2b3797b3 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -1206,7 +1206,7 @@ int FCEUMOV_WriteState(EMUFILE* os) else return 0; } -bool CheckTimelines(MovieData& stateMovie, MovieData& currMovie, int& error) +bool CheckTimelines(MovieData& stateMovie, MovieData& currMovie, int& errorFr) { bool isInTimeline = true; int length; @@ -1227,7 +1227,7 @@ bool CheckTimelines(MovieData& stateMovie, MovieData& currMovie, int& error) if (!stateMovie.records[x].Compare(currMovie.records[x])) { isInTimeline = false; - error = x; + errorFr = x; break; } } @@ -1313,8 +1313,8 @@ bool FCEUMOV_ReadState(EMUFILE* is, uint32 size) { //if we made it this far, then the savestate has identical movie data but we want to know now if the stateMOVIE size is greater than current movie size and make this error - - if(tempMovieData.records.size() > currMovieData.records.size()) + //currFrameCounter at this point represents the savestate framecount + if(currFrameCounter > currMovieData.records.size()) { //TODO: turn frame counter to red to get attention FCEU_PrintError("Savestate is from a frame (%d) after the final frame in the movie (%d). This is not permitted.", tempMovieData.records.size(), currMovieData.records.size()-1);