diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h index 78052def11..62c0d6347d 100644 --- a/Source/Core/Common/Arm64Emitter.h +++ b/Source/Core/Common/Arm64Emitter.h @@ -756,7 +756,7 @@ private: void PoisonMemory() override { u32* ptr = (u32*)region; - u32* maxptr = (u32*)region + region_size; + u32* maxptr = (u32*)(region + region_size); // If our memory isn't a multiple of u32 then this won't write the last remaining bytes with anything // Less than optimal, but there would be nothing we could do but throw a runtime warning anyway. // AArch64: 0xD4200000 = BRK 0 diff --git a/Source/Core/Common/ArmEmitter.h b/Source/Core/Common/ArmEmitter.h index 1f9ee751b3..f04232d682 100644 --- a/Source/Core/Common/ArmEmitter.h +++ b/Source/Core/Common/ArmEmitter.h @@ -689,7 +689,7 @@ private: void PoisonMemory() override { u32* ptr = (u32*)region; - u32* maxptr = (u32*)region + region_size; + u32* maxptr = (u32*)(region + region_size); // If our memory isn't a multiple of u32 then this won't write the last remaining bytes with anything // Less than optimal, but there would be nothing we could do but throw a runtime warning anyway. // ARM: 0x01200070 = BKPT 0