13
0

fix edge-case in Dummy-backend random number generator initialization

This commit is contained in:
Robin Gareus 2015-11-12 09:49:40 -06:00
parent 92fe47bdee
commit 4b25c80cb9

View File

@ -1525,6 +1525,7 @@ void DummyPort::setup_random_number_generator ()
_rseed = g_get_monotonic_time() % UINT_MAX; _rseed = g_get_monotonic_time() % UINT_MAX;
} }
_rseed = (_rseed + (uint64_t)this) % UINT_MAX; _rseed = (_rseed + (uint64_t)this) % UINT_MAX;
if (_rseed == 0) _rseed = 1;
} }
inline uint32_t inline uint32_t