changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: mptov: make it actually work

changeset 6939: c9bc1bdaee18
parent 6938: 2109eab7793b
child 6940: 9155f29f0eab
author: aiju
date: Wed, 05 Dec 2018 10:26:52 +0000
files: sys/src/libmp/port/mptov.c
description: mptov: make it actually work
     1.1--- a/sys/src/libmp/port/mptov.c
     1.2+++ b/sys/src/libmp/port/mptov.c
     1.3@@ -47,7 +47,7 @@ mptov(mpint *b)
     1.4 
     1.5 	v = 0ULL;
     1.6 	for(s = 0; s < b->top; s++)
     1.7-		v |= b->p[s]<<(s*sizeof(mpdigit)*8);
     1.8+		v |= (uvlong)b->p[s]<<(s*sizeof(mpdigit)*8);
     1.9 
    1.10 	if(b->sign > 0){
    1.11 		if(v > MAXVLONG)