diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2002-08-09 08:42:31 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2002-08-09 08:42:31 +0000 |
commit | c77e53266458e52a76ad3184e71966b793b1997d (patch) | |
tree | 9fa33999ba6932538372944759b706df43d14dcd | |
parent | 0252972fbbdb3a19512eb3da28fbfdcd57c92967 (diff) |
Fix an error in the CPU random fire routine that could cause a segfault.
-rw-r--r-- | games/bs/bs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/games/bs/bs.c b/games/bs/bs.c index e6529bee34b..30cee3aa2a2 100644 --- a/games/bs/bs.c +++ b/games/bs/bs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs.c,v 1.15 2002/08/09 08:36:33 pjanzen Exp $ */ +/* $OpenBSD: bs.c,v 1.16 2002/08/09 08:42:30 pjanzen Exp $ */ /* * bs.c - original author: Bruce Holloway * salvo option by: Chuck A DeGaul @@ -11,7 +11,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: bs.c,v 1.15 2002/08/09 08:36:33 pjanzen Exp $"; +static const char rcsid[] = "$OpenBSD: bs.c,v 1.16 2002/08/09 08:42:30 pjanzen Exp $"; #endif /* #define _POSIX_SOURCE */ /* ( random() ) */ @@ -977,6 +977,7 @@ static void randomfire(int *px, int *py) else if (srchstep > cpulongest) { --srchstep; + randomfire(px, py); } else { |