From a720596771c448744ee3c069524630a3e343de1a Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sun, 16 Jan 2022 21:20:56 -0800 Subject: [PATCH] GDB Stub: Fix typo mixing ppcState.spr and ppcState.sr This resulted in an out-of-bounds array access, since sr is only 16 entries long and SPR_IBAT0U evaluates to 528. --- Source/Core/Core/PowerPC/GDBStub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/GDBStub.cpp b/Source/Core/Core/PowerPC/GDBStub.cpp index 91bc4a465d..f097135940 100644 --- a/Source/Core/Core/PowerPC/GDBStub.cpp +++ b/Source/Core/Core/PowerPC/GDBStub.cpp @@ -633,7 +633,7 @@ static void WriteRegister() } else if (id >= 88 && id < 104) { - PowerPC::ppcState.sr[SPR_IBAT0U + id - 88] = re32hex(bufptr); + PowerPC::ppcState.spr[SPR_IBAT0U + id - 88] = re32hex(bufptr); } else {