changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > plan9front / sys/src/libmp/port/mptouv.c

revision 6941: 73f77dc6f0c6
parent 5470: 7ddbe28273df
     1.1--- a/sys/src/libmp/port/mptouv.c
     1.2+++ b/sys/src/libmp/port/mptouv.c
     1.3@@ -33,11 +33,11 @@ mptouv(mpint *b)
     1.4 	uvlong v;
     1.5 	int s;
     1.6 
     1.7-	if(b->top == 0)
     1.8+	if(b->top == 0 || b->sign < 0)
     1.9 		return 0LL;
    1.10 
    1.11 	if(b->top > VLDIGITS)
    1.12-		return MAXVLONG;
    1.13+		return -1LL;
    1.14 
    1.15 	v = 0ULL;
    1.16 	for(s = 0; s < b->top; s++)