diff --git a/src/common/virtual_buffer.cpp b/src/common/virtual_buffer.cpp index c9f6536782..ee73ddd3a2 100644 --- a/src/common/virtual_buffer.cpp +++ b/src/common/virtual_buffer.cpp @@ -141,10 +141,10 @@ void InitSwap() noexcept {} void* AllocateMemoryPages(std::size_t size) noexcept { #ifdef _WIN32 - void* base = VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - if (base == nullptr) { + void* addr = VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + if (addr == nullptr) { // Probably failing to reserve is less likely than failing to commit - base = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE); + addr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE); } #elif defined(__OPENORBIS__) bool use_void_mem = true;