summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2021-01-03 01:32:14 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2021-01-03 01:32:14 +0000
commit245fd4bc4e73698c6639b30bc43107a9a7501bee (patch)
treeb51c191958e09f847961268abc53a317a8ad902b
parent17fc9da04bc98b31f397d52f16bcc185e5f1e6c4 (diff)
Obvious bugfix: requesting a long dictum from a file containing short
ones only or vice versa is an error rather than a recipe for success.
-rw-r--r--games/fortune/fortune/fortune.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c
index 459519e390d..94fb4b08c66 100644
--- a/games/fortune/fortune/fortune.c
+++ b/games/fortune/fortune/fortune.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fortune.c,v 1.62 2021/01/02 21:35:11 schwarze Exp $ */
+/* $OpenBSD: fortune.c,v 1.63 2021/01/03 01:32:13 schwarze Exp $ */
/* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */
/*-
@@ -165,7 +165,7 @@ main(int ac, char *av[])
init_prob();
if ((Short_only && minlen_in_list(File_list) > SLEN) ||
(Long_only && maxlen_in_list(File_list) <= SLEN))
- return 0;
+ return 1;
do {
get_fort();