mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Fix muldivmod
This commit is contained in:
parent
d6412ee30b
commit
cc86a0724a
1 changed files with 4 additions and 1 deletions
|
@ -1312,7 +1312,10 @@ bool AnyIntView<Tr>::mod_div_any(const AnyIntView<Tr>& yp, AnyIntView<Tr>& quot,
|
||||||
if (k > quot.max_size()) {
|
if (k > quot.max_size()) {
|
||||||
return invalidate_bool();
|
return invalidate_bool();
|
||||||
}
|
}
|
||||||
quot.set_size(k);
|
quot.set_size(max(k,1));
|
||||||
|
for(int qi=0; qi< max(k,1); qi++) {
|
||||||
|
quot.digits[qi]=0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (k >= quot.max_size()) {
|
if (k >= quot.max_size()) {
|
||||||
return invalidate_bool();
|
return invalidate_bool();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue