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)); }