diff options
| -rw-r--r-- | sys/src/libmp/port/mptouv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/libmp/port/mptouv.c b/sys/src/libmp/port/mptouv.c index 760b38fb5..e657ebcbb 100644 --- a/sys/src/libmp/port/mptouv.c +++ b/sys/src/libmp/port/mptouv.c @@ -33,11 +33,11 @@ mptouv(mpint *b) uvlong v; int s; - if(b->top == 0) + if(b->top == 0 || b->sign < 0) return 0LL; if(b->top > VLDIGITS) - return MAXVLONG; + return -1LL; v = 0ULL; for(s = 0; s < b->top; s++) |
