diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-07-31 03:06:00 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-07-31 03:06:00 -0400 |
| commit | c5188c76b3f39f941edae380c94d929da2abe5a5 (patch) | |
| tree | 847e46f1bea236a37f7aca8d40b86a5a82f85a09 /Source/Core/Common/MemoryUtil.cpp | |
| parent | 5bb9a74759dd6aeb7d4fc56cdbcb716aa7b311ef (diff) | |
| parent | 33450c80c3ca39ef1875f9c72898ba5749d06142 (diff) | |
Merge pull request #705 from Sonicadvance1/fix-memoryutil-check
Fixes a check for what mmap returns.
Diffstat (limited to 'Source/Core/Common/MemoryUtil.cpp')
| -rw-r--r-- | Source/Core/Common/MemoryUtil.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Common/MemoryUtil.cpp b/Source/Core/Common/MemoryUtil.cpp index 0ae08ced89..3a10d031cf 100644 --- a/Source/Core/Common/MemoryUtil.cpp +++ b/Source/Core/Common/MemoryUtil.cpp @@ -54,13 +54,13 @@ void* AllocateExecutableMemory(size_t size, bool low) // printf("Mapped executable memory at %p (size %ld)\n", ptr, // (unsigned long)size); -#if defined(__FreeBSD__) - if (ptr == MAP_FAILED) +#ifdef _WIN32 + if (ptr == nullptr) { - ptr = nullptr; #else - if (ptr == nullptr) + if (ptr == MAP_FAILED) { + ptr = nullptr; #endif PanicAlert("Failed to allocate executable memory"); } |
