git: 9front

Download patch

ref: 804cf64a9ca4bef2abac980da4b0c00ea38abc2f
parent: 9ab4b2f3a041b9384bf7ca73fe488f74e4790464
author: aiju <devnull@localhost>
date: Thu Dec 6 04:32:20 EST 2018

libmp: fix mptouv behaviour to match mptoui

--- a/sys/src/libmp/port/mptouv.c
+++ b/sys/src/libmp/port/mptouv.c
@@ -33,11 +33,11 @@
 	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++)
--