summaryrefslogtreecommitdiff
path: root/Source/Core/Common/CodeBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/CodeBlock.h')
-rw-r--r--Source/Core/Common/CodeBlock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/CodeBlock.h b/Source/Core/Common/CodeBlock.h
index af86cc9913..77d01439e3 100644
--- a/Source/Core/Common/CodeBlock.h
+++ b/Source/Core/Common/CodeBlock.h
@@ -55,7 +55,7 @@ public:
region_size = size;
total_region_size = size;
region = static_cast<u8*>(Common::AllocateExecutableMemory(total_region_size));
- T::SetCodePtr(region);
+ T::SetCodePtr(region, region + size);
}
// Always clear code space with breakpoints, so that if someone accidentally executes
@@ -86,7 +86,7 @@ public:
// Cannot currently be undone. Will write protect the entire code region.
// Start over if you need to change the code (call FreeCodeSpace(), AllocCodeSpace()).
void WriteProtect() { Common::WriteProtectMemory(region, region_size, true); }
- void ResetCodePtr() { T::SetCodePtr(region); }
+ void ResetCodePtr() { T::SetCodePtr(region, region + region_size); }
size_t GetSpaceLeft() const
{
ASSERT(static_cast<size_t>(T::GetCodePtr() - region) < region_size);