diff options
author | aiju <devnull@localhost> | 2018-12-06 09:32:20 +0000 |
---|---|---|
committer | aiju <devnull@localhost> | 2018-12-06 09:32:20 +0000 |
commit | 64d0d3b8ac00ef31607314415b302eb61ec441d3 (patch) | |
tree | bac1767c63c6f8d4c35c9ef3b94b3e261a9f578d /sys/src/libmp | |
parent | 17b80cbcf1d5a7c6afd74c7432ab64c100dbdc2f (diff) |
libmp: fix mptouv behaviour to match mptoui
Diffstat (limited to 'sys/src/libmp')
-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++) |