mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Memmap: More error checking for Memset
It now uses the same error checking as CopyFromEmu and CopyToEmu.
This commit is contained in:
@ -282,9 +282,12 @@ void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength)
|
|||||||
if (_iLength == 0)
|
if (_iLength == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
u8* ptr = GetPointer(_Address);
|
if (!ValidCopyRange(_Address, _iLength))
|
||||||
if (ptr != nullptr)
|
{
|
||||||
memset(ptr, _iValue, _iLength);
|
PanicAlert("Invalid range in Memset. %zx bytes at 0x%08x", _iLength, _Address);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
memset(GetPointer(_Address), _iValue, _iLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetString(u32 em_address, size_t size)
|
std::string GetString(u32 em_address, size_t size)
|
||||||
|
Reference in New Issue
Block a user