mp: fix bug in mplogic.c; update mkfile

This commit is contained in:
aiju 2015-12-08 19:43:22 +01:00
parent 87abbc649f
commit 609a9922ad
2 changed files with 2 additions and 1 deletions

View file

@ -38,6 +38,7 @@ FILES=\
mptoui\
mptov\
mptouv\
mplogic\
ALLOFILES=${FILES:%=%.$O}
# cull things in the per-machine directories from this list

View file

@ -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);
}