mirror of
https://github.com/decaf-emu/decaf-emu.git
synced 2024-06-16 03:17:10 -04:00
ios/kernel: IOS_HeapRealloc
allocates a new block if ptr is null
This commit is contained in:
parent
dd0b1be358
commit
d985cc8b2b
|
@ -438,6 +438,11 @@ IOS_HeapRealloc(HeapId heapId,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// Allocate a new block if ptr is null
|
||||
if (!ptr) {
|
||||
return IOS_HeapAllocAligned(heapId, size, HeapAllocAlignAlign);
|
||||
}
|
||||
|
||||
if (!heapContainsPtr(heap, ptr)) {
|
||||
heap->errorCountExpandInvalidBlock++;
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in a new issue