mp: fix bug in mplogic.c; update mkfile
This commit is contained in:
parent
87abbc649f
commit
609a9922ad
|
@ -38,6 +38,7 @@ FILES=\
|
|||
mptoui\
|
||||
mptov\
|
||||
mptouv\
|
||||
mplogic\
|
||||
|
||||
ALLOFILES=${FILES:%=%.$O}
|
||||
# cull things in the per-machine directories from this list
|
||||
|
|
|
@ -138,7 +138,6 @@ mptrunc(mpint *b, int n, mpint *r)
|
|||
r->top = DIGITS(n);
|
||||
d = n / Dbits;
|
||||
m = n % Dbits;
|
||||
r->sign = 1;
|
||||
if(b->sign == -1){
|
||||
c = 1;
|
||||
for(i = 0; i <= r->top; i++){
|
||||
|
@ -162,6 +161,7 @@ mptrunc(mpint *b, int n, mpint *r)
|
|||
if(m != 0)
|
||||
r->p[d] = b->p[d] & (1<<m)-1;
|
||||
}
|
||||
r->sign = 1;
|
||||
mpnorm(r);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue