From 05d1b3605e0ba224f4c29b42c8af07023d1137ce Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 1 Aug 2021 10:12:00 +0300 Subject: [PATCH] Fixup for SPU Debug mode (bad SHA1) Should fix crashes due to read out of bounds. --- rpcs3/Emu/Cell/SPURecompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index bc0fbe6ab5..1df393e383 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -567,7 +567,7 @@ void spu_cache::initialize() u8 output[20]; sha1_starts(&ctx); - sha1_update(&ctx, bytes.data(), bytes.size() * sizeof(u32)); + sha1_update(&ctx, bytes.data(), bytes.size()); sha1_finish(&ctx, output); fmt::append(dump, "\n\t[%s] ", fmt::base57(output)); }