From 3bbc2c1f4cc634968ec557a8069c4d46cabd93f7 Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 22 Jul 2023 16:06:51 +0300 Subject: [PATCH] PPU Analyzer: Fixup get_ptr() --- rpcs3/Emu/Cell/PPUAnalyser.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/PPUAnalyser.h b/rpcs3/Emu/Cell/PPUAnalyser.h index d7e34e76a0..cde7fb7949 100644 --- a/rpcs3/Emu/Cell/PPUAnalyser.h +++ b/rpcs3/Emu/Cell/PPUAnalyser.h @@ -6,6 +6,7 @@ #include #include "util/types.hpp" #include "util/endian.hpp" +#include "util/asm.hpp" #include "util/to_endian.hpp" #include "Utilities/bit_set.h" @@ -127,7 +128,7 @@ struct ppu_module const u32 seg_size = seg.size; const u32 seg_addr = seg.addr; - if (seg_size >= std::max(size_bytes, 1) && addr <= seg_addr + seg_size - size_bytes) + if (seg_size >= std::max(size_bytes, 1) && addr <= utils::align(seg_addr + seg_size, 0x10000) - size_bytes) { return reinterpret_cast*>(static_cast(seg.ptr) + (addr - seg_addr)); }