diff options
author | ache <ache@FreeBSD.org> | 1997-09-24 23:00:29 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-09-24 23:00:29 +0000 |
commit | f9b741be26e67350ab1e15d6015911fc92a5d03b (patch) | |
tree | a17255a0bbfee2f5495ac7c78c4141ad15ca0516 /games/hangman/setup.c | |
parent | 0465821611c95ad45351ff6f5c46ece8accf952e (diff) | |
download | FreeBSD-src-f9b741be26e67350ab1e15d6015911fc92a5d03b.zip FreeBSD-src-f9b741be26e67350ab1e15d6015911fc92a5d03b.tar.gz |
Convert to random() and automatically fix bug with RAND_MAX is too large
Diffstat (limited to 'games/hangman/setup.c')
-rw-r--r-- | games/hangman/setup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/games/hangman/setup.c b/games/hangman/setup.c index d82e747..d1c6016 100644 --- a/games/hangman/setup.c +++ b/games/hangman/setup.c @@ -35,6 +35,7 @@ static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93"; #endif /* not lint */ +# include <stdlib.h> # include "hangman.h" /* @@ -61,7 +62,7 @@ setup() addstr(*sp); } - srand(time(NULL) + getpid()); + srandomdev(); if ((Dict = fopen(_PATH_DICT, "r")) == NULL) { perror(_PATH_DICT); endwin(); |