From: Christian Heller Date: Thu, 29 Aug 2013 04:05:13 +0000 (+0200) Subject: Let's see if this provides better pseudo-randomness. X-Git-Tag: tce~1008 X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/do_day?a=commitdiff_plain;h=21f71b2e4a9f406110d9add9ae52eec34729519f;p=plomrogue Let's see if this provides better pseudo-randomness. --- diff --git a/src/rrand.c b/src/rrand.c index f790ac1..e2b459b 100644 --- a/src/rrand.c +++ b/src/rrand.c @@ -10,7 +10,7 @@ static uint32_t seed = 0; extern uint16_t rrand() { /* Constants as recommended by POSIX.1-2001 (see man page rand(3)). */ - seed = ((seed * 1103515245) + 12345) % 2147483648; + seed = ((seed * 1103515245) + 12345) % 2147483647; return (seed >> 16); /* Ignore less random least significant 16 bits. */ }