Read-only loadstate - revert a logic error I had in determining a "future event" error.

This commit is contained in:
adelikat 2010-05-18 04:07:25 +00:00
parent 4e66aaef9c
commit cec1766f34
1 changed files with 4 additions and 4 deletions

View File

@ -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);