From 0f455b346ee27e994fca01a9b031a2ddb10aeb86 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 23 Aug 2005 13:31:11 +0000 Subject: [PATCH] Fix broken lrand48() implementation, per Merlin Moncure. --- src/port/rand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/port/rand.c b/src/port/rand.c index ca1d621fca..b4631299e9 100644 --- a/src/port/rand.c +++ b/src/port/rand.c @@ -63,7 +63,7 @@ long lrand48(void) { _dorand48(_rand48_seed); - return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] > 1); + return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] >> 1); } void