Skip to content

Commit

Permalink
Fixed SlowRam snapshot bug (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Dec 17, 2022
1 parent 7782c15 commit 9ab1718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Emulator/Memory/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,12 @@ Memory::didLoadFromBuffer(const u8 *buffer)
<< slowSize
<< fastSize;

// Check the integrity of the new values before we allocate memory
// Check the integrity of the new values before allocating memory
if (romSize > KB(512)) throw VAError(ERROR_SNAP_CORRUPTED);
if (womSize > KB(256)) throw VAError(ERROR_SNAP_CORRUPTED);
if (extSize > KB(512)) throw VAError(ERROR_SNAP_CORRUPTED);
if (chipSize > MB(2)) throw VAError(ERROR_SNAP_CORRUPTED);
if (slowSize > KB(512)) throw VAError(ERROR_SNAP_CORRUPTED);
if (slowSize > KB(1792)) throw VAError(ERROR_SNAP_CORRUPTED);
if (fastSize > MB(8)) throw VAError(ERROR_SNAP_CORRUPTED);

// Allocate ROM space (only if Roms are included in the snapshot)
Expand Down

0 comments on commit 9ab1718

Please sign in to comment.