diff options
Diffstat (limited to 'lib/libc/gen/jrand48.c')
-rw-r--r-- | lib/libc/gen/jrand48.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/gen/jrand48.c b/lib/libc/gen/jrand48.c index 1707620..5aab1e1 100644 --- a/lib/libc/gen/jrand48.c +++ b/lib/libc/gen/jrand48.c @@ -14,11 +14,14 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <stdint.h> + #include "rand48.h" long jrand48(unsigned short xseed[3]) { + _dorand48(xseed); - return ((long) xseed[2] << 16) + (long) xseed[1]; + return ((int32_t)(((uint32_t)xseed[2] << 16) | (uint32_t)xseed[1])); } |