1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Fix muldivmod

This commit is contained in:
OmicronTau 2021-09-15 18:08:39 +03:00 committed by main
parent d6412ee30b
commit cc86a0724a

View file

@ -1312,7 +1312,10 @@ bool AnyIntView<Tr>::mod_div_any(const AnyIntView<Tr>& yp, AnyIntView<Tr>& quot,
if (k > quot.max_size()) {
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 {
if (k >= quot.max_size()) {
return invalidate_bool();