From 5c66e02d89d57ecc63fccd60c80411d741a722e0 Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 28 Jan 2008 05:48:57 +0000 Subject: 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. --- larn/io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'larn/io.c') 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 #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 */ } -- cgit v1.2.3