aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-11-11 22:47:25 +0000
committergingerBill <bill@gingerbill.org>2019-11-11 22:47:25 +0000
commit5bf71ba75ca4044fee1a96d81e4be22b3d169a97 (patch)
tree48a2120e3d53eef38adcd4b77a67f7610576012f
parent967981aacd9ce6dd0fd5dd4925bfddb793338807 (diff)
big_int addition overflow rules
-rw-r--r--src/big_int.cpp2
1 files changed, 1 insertions, 1 deletions
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;