From 093198e3d5942cc5467df247bbffd62a56f3f29a Mon Sep 17 00:00:00 2001 From: Eladash <18193363+elad335@users.noreply.github.com> Date: Mon, 15 Apr 2024 16:44:30 +0300 Subject: [PATCH] savestate_utils.cpp: Fixup a tiny bug --- rpcs3/Emu/savestate_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/savestate_utils.cpp b/rpcs3/Emu/savestate_utils.cpp index d428047684..de5bc8d486 100644 --- a/rpcs3/Emu/savestate_utils.cpp +++ b/rpcs3/Emu/savestate_utils.cpp @@ -323,8 +323,8 @@ bool boot_last_savestate(bool testing) bool load_and_check_reserved(utils::serial& ar, usz size) { u8 bytes[4096]; + ensure(size < std::size(bytes)); std::memset(&bytes[size & (0 - sizeof(v128))], 0, sizeof(v128)); - ensure(size <= std::size(bytes)); const usz old_pos = ar.pos; ar(std::span(bytes, size));