Browse Source

big_int addition overflow rules

gingerBill 5 years ago
parent
commit
5bf71ba75c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/big_int.cpp

+ 1 - 1
src/big_int.cpp

@@ -532,7 +532,7 @@ void big_int_add(BigInt *dst, BigInt const *x, BigInt const *y) {
 				overflow += 1;
 				overflow += 1;
 			} else {
 			} else {
 				// IMPORTANT TODO(bill): Is this mathematics correct here?
 				// IMPORTANT TODO(bill): Is this mathematics correct here?
-				v += prev_overflow;
+				v += overflow;
 			}
 			}
 			dst->d.words[i] = v;
 			dst->d.words[i] = v;
 			i += 1;
 			i += 1;