Skip to content

Commit

Permalink
Merge pull request #14092 from unknownbrackets/savestate
Browse files Browse the repository at this point in the history
SaveState: Prevent crash on bad cookie marker
  • Loading branch information
hrydgard authored Feb 9, 2021
2 parents 8b101ae + 45f3f45 commit 242e590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Common/Serialize/Serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void PointerWrap::DoMarker(const char *prevName, u32 arbitraryNumber) {
u32 cookie = arbitraryNumber;
Do(*this, cookie);
if (mode == PointerWrap::MODE_READ && cookie != arbitraryNumber) {
_assert_msg_(false, "Error: After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). Aborting savestate load...", prevName, cookie, cookie, arbitraryNumber, arbitraryNumber);
ERROR_LOG(SAVESTATE, "Error: After \"%s\", found %d (0x%X) instead of save marker %d (0x%X). Aborting savestate load...", prevName, cookie, cookie, arbitraryNumber, arbitraryNumber);
SetError(ERROR_FAILURE);
}
}
Expand Down

0 comments on commit 242e590

Please sign in to comment.