diff options
-rw-r--r-- | games/trek/ranf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/games/trek/ranf.c b/games/trek/ranf.c index bc4f530f45a..964c8c4f938 100644 --- a/games/trek/ranf.c +++ b/games/trek/ranf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ranf.c,v 1.7 2016/01/07 14:37:51 mestre Exp $ */ +/* $OpenBSD: ranf.c,v 1.8 2016/03/08 18:43:47 mestre Exp $ */ /* $NetBSD: ranf.c,v 1.3 1995/04/22 10:59:21 cgd Exp $ */ /* @@ -32,6 +32,8 @@ #include <stdlib.h> +#include "trek.h" + int ranf(int max) { @@ -39,7 +41,7 @@ ranf(int max) if (max <= 0) return (0); - t = random() >> 5; + t = random(); return (t % max); } |