summaryrefslogtreecommitdiffstats
path: root/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'rand.c')
-rw-r--r--rand.c2
1 files changed, 1 insertions, 1 deletions
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)