From a5fd29f4d035b0e62ef3041147f62c9d6f2f0b40 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Fri, 7 Jan 2011 06:58:27 -0600 Subject: [PATCH] (gocha) "Fix wrong logic of snapshot inconsistent with movie" --- movie.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/movie.cpp b/movie.cpp index a153533c..d6dd270d 100644 --- a/movie.cpp +++ b/movie.cpp @@ -745,7 +745,8 @@ int S9xMovieUnfreeze (uint8 *buf, uint32 size) } else { - if (current_frame > Movie.MaxFrame || current_sample > Movie.MaxSample || memcmp(Movie.InputBuffer, ptr, space_needed)) + uint32 space_processed = (Movie.BytesPerSample * (current_sample + 1)); + if (current_frame > Movie.MaxFrame || current_sample > Movie.MaxSample || memcmp(Movie.InputBuffer, ptr, space_processed)) return (SNAPSHOT_INCONSISTENT); change_state(MOVIE_STATE_PLAY);