git: 9front

Download patch

ref: a94dca5d65c2bbe90a38a62123192cfa4063870e
parent: 01217af24120f82754262207683a615dae632d30
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Dec 6 15:53:54 EST 2015

libmp: fix assert() for mpexp() with nil modulus

--- a/sys/src/libmp/port/mpexp.c
+++ b/sys/src/libmp/port/mpexp.c
@@ -22,7 +22,7 @@
 	mpdigit d, bit;
 	int i, j;
 
-	assert(m->flags & MPnorm);
+	assert(m == nil || m->flags & MPnorm);
 	assert((e->flags & MPtimesafe) == 0);
 	res->flags |= b->flags & MPtimesafe;
 
--