Merge pull request #12685 from JosJuice/get-pointer-for-range-zero-size

Memmap: Don't show panic alert for 0 length range
This commit is contained in:
Admiral H. Curtiss authored and GitHub committed 2024-04-04 21:08:53 +02:00
commit 0aa92f7a56
1 file changed
+1 -1
+1 -1
View File
@@ -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;