Amend 55211b8d (PRNG seed, use local address)

This commit is contained in:
Robin Gareus 2021-08-16 04:59:10 +02:00
parent baf5a13f17
commit b4b4745bd4
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 4 additions and 3 deletions

View File

@ -25,11 +25,12 @@
using namespace PBD;
PCGRand::PCGRand ()
: _state (0)
, _foo (0)
{
int foo = 0;
uint64_t initseq = (intptr_t)&foo;
_state = 0;
uint64_t initseq = (intptr_t)&_foo;
_inc = (initseq << 1) | 1;
rand_u32 ();
_state += time (NULL) ^ (intptr_t)this;
rand_u32 ();