diff --git a/desmume/src/thumb_instructions.cpp b/desmume/src/thumb_instructions.cpp index 8ee622b00..7102cc79c 100644 --- a/desmume/src/thumb_instructions.cpp +++ b/desmume/src/thumb_instructions.cpp @@ -455,7 +455,7 @@ TEMPLATE static u32 FASTCALL OP_ADC_REG(const u32 i) } cpu->CPSR.bits.N = BIT31(cpu->R[REG_NUM(i, 0)]); cpu->CPSR.bits.Z = (cpu->R[REG_NUM(i, 0)] == 0); - cpu->CPSR.bits.V = (Rd ^ Rm ^ -1) & (Rd ^ cpu->R[REG_NUM(i, 0)]) != 0; + cpu->CPSR.bits.V = (((Rd ^ Rm ^ -1) & (Rd ^ cpu->R[REG_NUM(i, 0)])) != 0); return 1; }