about summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/jrand48_r.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/jrand48_r.c b/stdlib/jrand48_r.c
index ce4c8b0a95..95f3ec62b2 100644
--- a/stdlib/jrand48_r.c
+++ b/stdlib/jrand48_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -31,7 +31,7 @@ __jrand48_r (xsubi, buffer, result)
 
   /* Store the result.  */
   if (sizeof (unsigned short int) == 2)
-    *result = (xsubi[2] & 0x7fff) | xsubi[1];
+    *result = ((xsubi[2] & 0x7fff) << 16) | xsubi[1];
   else
     *result = xsubi[2] & 0x7fffffffl;