mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-11-12 17:19:51 +01:00
Create memory with nullptr address if it initially fails.
This commit is contained in:
1 parent
25610a6249
commit
7ed7921c54
1 file changed
+3
@@ -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