mptrunc: normalize after mpassign to handle the case b==r

This commit is contained in:
aiju 2016-08-08 00:54:45 +02:00
parent 333468d668
commit c6318ecb17

View file

@ -153,6 +153,7 @@ mptrunc(mpint *b, int n, mpint *r)
}else if(b->sign == 1){
if(d >= b->top){
mpassign(b, r);
mpnorm(r);
return;
}
if(b != r)