blob: 25fa8ce1bcc16ec9399d4ed6fbc03879973fd6d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$NetBSD: patch-ab,v 1.1 2007/01/04 19:37:51 agc Exp $
Fix a bug in the random routines which don't set the 'sn' flag
--- gmp.c 2007/01/04 13:17:13 1.1
+++ gmp.c 2007/01/04 13:15:45
@@ -1230,6 +1230,7 @@
}
if (oflow)
(x->p)[digits-1] &= (((mp_limb)1 << oflow) - 1);
+ x->sn = 1;
}
void mpz_random2(x,size)
MP_INT *x; unsigned int size;
@@ -1251,6 +1252,7 @@
}
if (oflow)
(x->p)[digits-1] &= (((mp_limb)1 << oflow) - 1);
+ x->sn = 1;
}
size_t mpz_size(x)
|