diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp index 5801b527c1..5b5d4450a6 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp @@ -501,18 +501,18 @@ void Interpreter::divwx(UGeckoInstruction inst) { const s32 a = rGPR[inst.RA]; const s32 b = rGPR[inst.RB]; - const bool overflow = b == 0 || ((u32)a == 0x80000000 && b == -1); + const bool overflow = b == 0 || (static_cast(a) == 0x80000000 && b == -1); if (overflow) { - if (((u32)a & 0x80000000) && b == 0) + if (a < 0) rGPR[inst.RD] = UINT32_MAX; else rGPR[inst.RD] = 0; } else { - rGPR[inst.RD] = (u32)(a / b); + rGPR[inst.RD] = static_cast(a / b); } if (inst.OE)