From 7acd63c08b3b969696681ee8125ea63e543998c8 Mon Sep 17 00:00:00 2001 From: Marco Bodrato Date: Mon, 9 Nov 2015 22:30:52 +0100 Subject: mpz: Lazy allocation. --- rand/randlc2x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rand') diff --git a/rand/randlc2x.c b/rand/randlc2x.c index 195f75932..dc5a9a526 100644 --- a/rand/randlc2x.c +++ b/rand/randlc2x.c @@ -319,7 +319,7 @@ gmp_randinit_lc_2exp (gmp_randstate_t rstate, if (SIZ (p->_mp_a) == 0) { SIZ (p->_mp_a) = 1; - PTR (p->_mp_a)[0] = CNST_LIMB (0); + MPZ_NEWALLOC (p->_mp_a, 1)[0] = CNST_LIMB (0); } MPN_SET_UI (p->_cp, p->_cn, c); -- cgit v1.2.1