mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 1f097f28e08aabcb382283e429494a25c552d87d
parent 9bec745dde6a85b16d2bb87a4ab1c86961e5d950
Author: leovilok <leovilok@gmail.com>
Date:   Fri, 21 Apr 2017 14:49:16 +0200

mgenmid: fix fallback random generation on 32bit

lrand48 returns a long int, which is 32bits wide on 32bits systems

Closes: #28 [via git-merge-pr]

Diffstat:
mgenmid.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mgenmid.c b/mgenmid.c @@ -99,7 +99,7 @@ int main() } else { fallback: srand48(tp.tv_sec ^ tp.tv_usec ^ getpid()); - rnd = (lrand48() << 32) + lrand48(); + rnd = ((uint64_t)lrand48() << 32) + lrand48(); } rnd |= (1LL << 63); // set highest bit to force full width