Negative size allocs. Probably.

This commit is contained in:
Ben Vanik
2015-02-01 21:20:55 -08:00
parent 493c3d7656
commit 59adde4d7f
2 changed files with 14 additions and 10 deletions

View File

@@ -86,7 +86,7 @@ SHIM_CALL NtAllocateVirtualMemory_shim(PPCContext* ppc_state,
}
// Allocate.
uint32_t flags = (allocation_type & X_MEM_NOZERO);
uint32_t flags = (allocation_type & X_MEM_NOZERO) ? 0 : MEMORY_FLAG_ZERO;
uint32_t addr = (uint32_t)state->memory()->HeapAlloc(base_addr_value,
adjusted_size, flags);
if (!addr) {