mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
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.
This commit is contained in:
parent
6e88d42dcd
commit
c3f0a71bac
@ -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 $ */
|
/* $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();
|
init_prob();
|
||||||
if ((Short_only && minlen_in_list(File_list) > SLEN) ||
|
if ((Short_only && minlen_in_list(File_list) > SLEN) ||
|
||||||
(Long_only && maxlen_in_list(File_list) <= SLEN))
|
(Long_only && maxlen_in_list(File_list) <= SLEN))
|
||||||
return 0;
|
return 1;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
get_fort();
|
get_fort();
|
||||||
|
Loading…
Reference in New Issue
Block a user