Commit 0f455b34 authored by Tom Lane's avatar Tom Lane

Fix broken lrand48() implementation, per Merlin Moncure.

parent e889ff4d
...@@ -63,7 +63,7 @@ long ...@@ -63,7 +63,7 @@ long
lrand48(void) lrand48(void)
{ {
_dorand48(_rand48_seed); _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 void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment