diff --git a/sys/src/libmp/port/mpadd.c b/sys/src/libmp/port/mpadd.c index 9a1ccde66..3672c2c34 100644 --- a/sys/src/libmp/port/mpadd.c +++ b/sys/src/libmp/port/mpadd.c @@ -21,10 +21,12 @@ mpmagadd(mpint *b1, mpint *b2, mpint *sum) m = b2->top; if(n == 0){ mpassign(mpzero, sum); + sum->sign = 1; return; } if(m == 0){ mpassign(b1, sum); + sum->sign = 1; return; } mpbits(sum, (n+1)*Dbits);