abacus: bignum: fix carry bug in addition

This commit is contained in:
Bruno BELANYI 2021-08-21 01:23:23 +02:00
parent c23500607f
commit 7cd0664e60
2 changed files with 13 additions and 0 deletions

View file

@ -52,6 +52,10 @@ digits_type do_addition(digits_type const& lhs, digits_type const& rhs) {
++it;
}
if (carry != 0) {
res.push_back(carry);
}
return res;
}