diff --git a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp index 16d74bc364..313fddc59f 100644 --- a/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPUCommonRecompiler.cpp @@ -1177,7 +1177,7 @@ void spu_cache::initialize(bool build_existing_cache) bool sk = false; - for (u32 i = 0; i < bytes.size(); i++) + for (u32 i = 0; i < std::min(bytes.size(), std::max(256, depth_m)); i++) { if (depth_m == i) { @@ -1204,7 +1204,7 @@ void spu_cache::initialize(bool build_existing_cache) fmt::append(dump, "\n\t%49s", ""); - for (u32 i = 0; i < f->data.size(); i++) + for (u32 i = 0; i < std::min(f->data.size(), std::max(64, utils::aligned_div(depth_m, 4))); i++) { fmt::append(dump, "%-10s", g_spu_iname.decode(std::bit_cast>(f->data[i]))); }