Skip to content

Commit 05c4e34

Browse files
authored
set hasSpare to false at initialization of random number generator (#979)
set hasSpare to false at initialization
1 parent c4cec63 commit 05c4e34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

atintegrators/atrandom.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ static void pcg32_srandom_r(pcg32_random_t* rng, uint64_t initstate, uint64_t in
8080
pcg32_random_r(rng);
8181
rng->state += initstate;
8282
pcg32_random_r(rng);
83+
rng->hasSpare = false;
8384
}
8485

8586
static void pcg32_srandom(uint64_t seed, uint64_t seq)

0 commit comments

Comments
 (0)