summaryrefslogtreecommitdiffstats
path: root/larn
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2008-01-28 05:48:57 +0000
committerdholland <dholland@NetBSD.org>2008-01-28 05:48:57 +0000
commit5c66e02d89d57ecc63fccd60c80411d741a722e0 (patch)
treefee98dde849ac1600ab875e20bea24ece92a6c7d /larn
parente30950ccc7c7c31c69f1d31c16b0212bbf168ceb (diff)
downloadbsdgames-darwin-5c66e02d89d57ecc63fccd60c80411d741a722e0.tar.gz
bsdgames-darwin-5c66e02d89d57ecc63fccd60c80411d741a722e0.tar.zst
bsdgames-darwin-5c66e02d89d57ecc63fccd60c80411d741a722e0.zip
Call srandom() as well as initializing the private random generator
(which is crappy and should be removed, but that's for another day...) This way e.g. fortune cookies no longer appear always in the same order.
Diffstat (limited to 'larn')
-rw-r--r--larn/io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/larn/io.c b/larn/io.c
index 23ba9969..ac3fadab 100644
--- a/larn/io.c
+++ b/larn/io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.19 2008/01/28 05:38:54 dholland Exp $ */
+/* $NetBSD: io.c,v 1.20 2008/01/28 05:48:57 dholland Exp $ */
/*
* io.c Larn is copyrighted 1986 by Noah Morgan.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: io.c,v 1.19 2008/01/28 05:38:54 dholland Exp $");
+__RCSID("$NetBSD: io.c,v 1.20 2008/01/28 05:48:57 dholland Exp $");
#endif /* not lint */
#include "header.h"
@@ -211,6 +211,7 @@ newgame()
for (p = c, pe = c + 100; p < pe; *p++ = 0);
time(&initialtime);
seedrand(initialtime);
+ srandom(initialtime);
lcreat((char *) 0); /* open buffering for output to terminal */
}