abacus: bignum: fix carry bug in addition
This commit is contained in:
parent
c23500607f
commit
7cd0664e60
2 changed files with 13 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue