From 5bf71ba75ca4044fee1a96d81e4be22b3d169a97 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 11 Nov 2019 22:47:25 +0000 Subject: [PATCH] big_int addition overflow rules --- src/big_int.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/big_int.cpp b/src/big_int.cpp index a24b2f28d..1db9eafa7 100644 --- a/src/big_int.cpp +++ b/src/big_int.cpp @@ -532,7 +532,7 @@ void big_int_add(BigInt *dst, BigInt const *x, BigInt const *y) { overflow += 1; } else { // IMPORTANT TODO(bill): Is this mathematics correct here? - v += prev_overflow; + v += overflow; } dst->d.words[i] = v; i += 1;