PPC: fix UB sint overflow

This commit is contained in:
Fabio Arnold 2026-03-18 23:05:17 +01:00
parent 245f7ed270
commit fbff89d03b

View File

@ -33,7 +33,7 @@ static bool checkAdditionOverflow(uint32 x, uint32 y, uint32 r)
static void PPCInterpreter_ADD(PPCInterpreter_t* hCPU, uint32 opcode)
{
PPC_OPC_TEMPL3_XO();
hCPU->gpr[rD] = (int)hCPU->gpr[rA] + (int)hCPU->gpr[rB];
hCPU->gpr[rD] = hCPU->gpr[rA] + hCPU->gpr[rB];
if (opHasRC())
ppc_update_cr0(hCPU, hCPU->gpr[rD]);
PPCInterpreter_nextInstruction(hCPU);