diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 77066889e..df3d062d8 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -1542,7 +1542,7 @@ template void Proces extend_flag_ = carry_flag_ = decltype(carry_flag_)(result & ~0xff); \ negative_flag_ = result & 0x80; \ const int unadjusted_result = destination - source - (extend_flag_ ? 1 : 0); \ - overflow_flag_ = ~unadjusted_result & result & 0x80; \ + overflow_flag_ = unadjusted_result & ~result & 0x80; \ \ /* Store the result. */ \ destination()->halves.low.halves.low = uint8_t(result);