From e0ccc2092cecc2c3daceb794d4e3fe1773899fce Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 26 Oct 2024 16:45:52 +0900 Subject: [PATCH] GBA: Merged bug fix in new multiply logic --- Core/GBA/GbaCpuMultiply.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/GBA/GbaCpuMultiply.h b/Core/GBA/GbaCpuMultiply.h index 85165f35..5b825f29 100644 --- a/Core/GBA/GbaCpuMultiply.h +++ b/Core/GBA/GbaCpuMultiply.h @@ -173,8 +173,8 @@ private: static AdderOutput adder(uint32_t a, uint32_t b, bool carry) { uint32_t output = a + b + carry; - bool overflow = output < a || output < b; - return { output, overflow }; + uint64_t real_output = (uint64_t)a + (uint64_t)b + (uint64_t)carry; + return { output, output != real_output }; } static u128 u128_ror(u128 input, int shift)