From: Pavel Charvat Date: Tue, 1 Oct 2024 08:19:39 +0000 (+0000) Subject: Random: Fixed bug in xoroshiro128 implementation. X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=88fe8b52158156367d43decbdeb1454cc6700dd7;p=libucw.git Random: Fixed bug in xoroshiro128 implementation. --- diff --git a/ucw/random-fast.c b/ucw/random-fast.c index 7ba31814..32b3a260 100644 --- a/ucw/random-fast.c +++ b/ucw/random-fast.c @@ -213,6 +213,7 @@ static inline u64 fastrand_one(struct fastrand *c) #else # error "Unsupported xoroshiro parameters" #endif + s1 ^= s0; s[0] = fastrand_rol64(s0, ra) ^ s1 ^ (s1 << rb); s[1] = fastrand_rol64(s1, rc);