From 09ef426ac6af0af148fa7ad0b241508b9ea77510 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 17 Aug 2023 11:37:03 +0930 Subject: [PATCH] Rsp: Fix memory allocation of recompiler memory --- Source/Project64-rsp-core/cpu/RspMemory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Project64-rsp-core/cpu/RspMemory.cpp b/Source/Project64-rsp-core/cpu/RspMemory.cpp index 986900cfa..4f0020d52 100644 --- a/Source/Project64-rsp-core/cpu/RspMemory.cpp +++ b/Source/Project64-rsp-core/cpu/RspMemory.cpp @@ -32,7 +32,7 @@ int AllocateMemory(void) if (RecompCodeSecondary == nullptr) { RecompCodeSecondary = (uint8_t *)AllocateAddressSpace(0x00200004); - RecompCodeSecondary = (uint8_t *)CommitMemory(RecompCode, 0x00200000, MEM_EXECUTE_READWRITE); + RecompCodeSecondary = (uint8_t *)CommitMemory(RecompCodeSecondary, 0x00200000, MEM_EXECUTE_READWRITE); if (RecompCodeSecondary == nullptr) { g_Notify->DisplayError("Not enough memory for RSP RecompCode Secondary!"); @@ -43,7 +43,7 @@ int AllocateMemory(void) if (JumpTables == nullptr) { JumpTables = (uint8_t *)AllocateAddressSpace(0x1000 * MaxMaps); - JumpTables = (uint8_t *)CommitMemory(RecompCode, 0x1000 * MaxMaps, MEM_READWRITE); + JumpTables = (uint8_t *)CommitMemory(JumpTables, 0x1000 * MaxMaps, MEM_READWRITE); if (JumpTables == nullptr) { g_Notify->DisplayError("Not enough memory for jump table!");