shithub: drawterm

Download patch

ref: 35ab5a74c2a8a7e197f35b833694aa28d12bade7
parent: 00c19a0e1f446f1ca083b2cba96b6cc37a7cde44
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Sep 8 03:54:25 EDT 2016

libmp: update mptov.c and mplogic.c from 9front

--- a/libmp/mplogic.c	Tue Sep  6 17:26:33 2016
+++ b/libmp/mplogic.c	Thu Sep  8 03:54:25 2016
@@ -141,7 +141,7 @@
 	m = n % Dbits;
 	if(b->sign == -1){
 		c = 1;
-		for(i = 0; i <= r->top; i++){
+		for(i = 0; i < r->top; i++){
 			if(i < b->top)
 				r->p[i] = ~(b->p[i] - c);
 			else
--- a/libmp/mptouv.c	Tue Sep  6 17:26:33 2016
+++ b/libmp/mptouv.c	Thu Sep  8 03:54:25 2016
@@ -14,10 +14,10 @@
 	int s;
 
 	if(b == nil){
-		b = mpnew(VLDIGITS*sizeof(mpdigit));
+		b = mpnew(VLDIGITS*Dbits);
 		setmalloctag(b, getcallerpc(&v));
 	}else
-		mpbits(b, VLDIGITS*sizeof(mpdigit));
+		mpbits(b, VLDIGITS*Dbits);
 	b->sign = 1;
 	for(s = 0; s < VLDIGITS; s++){
 		b->p[s] = v;