Memmap: Fix a CopyToEmu bug

ValidCopyRange incorrectly returned false and stopped a
CopyToEmu when pressing B+X+Start in some GameCube games
(for instance Metroid Prime) after the DVD thread was implemented
This commit is contained in:
JosJuice 2015-03-06 20:45:48 +01:00
parent 3d7afdae25
commit 555eb1162f

View file

@ -247,8 +247,8 @@ bool AreMemoryBreakpointsActivated()
static inline bool ValidCopyRange(u32 address, size_t size)
{
return (GetPointer(address) != nullptr &&
GetPointer(address + u32(size)) != nullptr &&
size < EXRAM_SIZE); // Make sure we don't have a range spanning seperate 2 banks
GetPointer(address + u32(size) - 1) != nullptr &&
size < EXRAM_SIZE); // Make sure we don't have a range spanning 2 separate banks
}
void CopyFromEmu(void* data, u32 address, size_t size)