diff options
Diffstat (limited to 'rand.c')
-rw-r--r-- | rand.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -255,7 +255,7 @@ val random(val state, val modulus) cobj_handle(self, state, random_state_s)); mp_int *m; - if (bignump(modulus) && !ISNEG(m = mp(modulus))) { + if (bignump(modulus) && !mp_isneg(m = mp(modulus))) { ucnum bits = mp_count_bits(m) - mp_is_pow_two(m); ucnum rands_needed = (bits + 32 - 1) / 32; ucnum msb_rand_bits = bits % 32; |