shithub: riscv

Download patch

ref: 64d0d3b8ac00ef31607314415b302eb61ec441d3
parent: 17b80cbcf1d5a7c6afd74c7432ab64c100dbdc2f
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++)