mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Memmap: Don't show panic alert for 0 length range
IOS::HLE::IOCtlVRequest::Dump sometimes tries to call GetPointerForRange with an address of 0 and a size of 0. Address 0 is valid, but we were mistakenly also trying to check that address 3FFFFFFF is valid, which it isn't. Fixes https://bugs.dolphin-emu.org/issues/13514.
This commit is contained in:
parent
a5e410df11
commit
fad57b648f
@ -409,7 +409,7 @@ u8* MemoryManager::GetPointerForRange(u32 address, size_t size) const
|
||||
|
||||
// Check that the beginning and end of the range are valid
|
||||
u8* pointer = GetPointer(address);
|
||||
if (!pointer || !GetPointer(address + u32(size) - 1))
|
||||
if (pointer == nullptr || (size != 0 && GetPointer(address + u32(size) - 1) == nullptr))
|
||||
{
|
||||
// A panic alert has already been raised by GetPointer
|
||||
return nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user