From b4b045a8e7c65783d94812553e31ae0282e80cc4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 21 Dec 2011 15:40:22 -0800 Subject: * arith.c (normalize): Linkage changed to extern. * arith.h (normalize): Declared. * rand.c (random): Bugfix: normalize the bignum before returning it. * txr.1: Doc stubs for PRNG functionality. --- rand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rand.c') diff --git a/rand.c b/rand.c index 0b811b9f..2e504514 100644 --- a/rand.c +++ b/rand.c @@ -192,7 +192,7 @@ val random(val state, val modulus) err = mp_mod(om, m, om); if (err != MP_OKAY) goto invalid; - return out; + return normalize(out); } else if (fixnump(modulus)) { cnum m = c_num(modulus); if (m <= 0) -- cgit v1.2.3