about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mgenmid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mgenmid.c b/mgenmid.c
index 6e5ec9d..36aa8c8 100644
--- 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