mptrunc: don't write to r->p[r->top]
This commit is contained in:
parent
560ea5474c
commit
d552fed385
|
@ -141,7 +141,7 @@ mptrunc(mpint *b, int n, mpint *r)
|
|||
m = n % Dbits;
|
||||
if(b->sign == -1){
|
||||
c = 1;
|
||||
for(i = 0; i <= r->top; i++){
|
||||
for(i = 0; i < r->top; i++){
|
||||
if(i < b->top)
|
||||
r->p[i] = ~(b->p[i] - c);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue