mirror of
https://github.com/hedge-dev/UnleashedRecomp
synced 2026-05-23 23:05:48 -04:00
Create memory with nullptr address if it initially fails.
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
Memory::Memory(void* address, size_t size) : size(size)
|
||||
{
|
||||
base = (char*)VirtualAlloc(address, size, MEM_RESERVE, PAGE_READWRITE);
|
||||
|
||||
if (base == nullptr)
|
||||
base = (char*)VirtualAlloc(nullptr, size, MEM_RESERVE, PAGE_READWRITE);
|
||||
}
|
||||
|
||||
void* Memory::Alloc(size_t offset, size_t size, uint32_t type)
|
||||
|
||||
Reference in New Issue
Block a user