mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-17 05:41:26 -06:00
PPC: use unsigned int where wrapping is defined
wrapping of signed integers is undefined behavior
This commit is contained in:
parent
ff8d78d2eb
commit
8e2cf6c7b2
@ -123,7 +123,7 @@ static void PPCInterpreter_ADDI(PPCInterpreter_t* hCPU, uint32 opcode)
|
||||
sint32 rD, rA;
|
||||
uint32 imm;
|
||||
PPC_OPC_TEMPL_D_SImm(opcode, rD, rA, imm);
|
||||
hCPU->gpr[rD] = (rA ? (int)hCPU->gpr[rA] : 0) + (int)imm;
|
||||
hCPU->gpr[rD] = (rA ? hCPU->gpr[rA] : 0u) + imm;
|
||||
PPCInterpreter_nextInstruction(hCPU);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user