summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>2004-01-01 16:02:07 +0000
committerjsm <jsm@NetBSD.org>2004-01-01 16:02:07 +0000
commit2c555a73bbf854397a4a373aa60192c2cf2df00a (patch)
tree5bea49a6c0eadf784e0cd190f6272a96ca9a0551
parent6183761dd72b608ed95527c5ffc5de85f73a9560 (diff)
downloadbsdgames-darwin-2c555a73bbf854397a4a373aa60192c2cf2df00a.tar.gz
bsdgames-darwin-2c555a73bbf854397a4a373aa60192c2cf2df00a.tar.zst
bsdgames-darwin-2c555a73bbf854397a4a373aa60192c2cf2df00a.zip
Return proper fortune length from fortlen for fortune files without
STR_RANDOM or STR_ORDERED rather than comparing it to SLEN. Bug reported by Simon Williams <simon@no-dns-yet.org.uk>.
-rw-r--r--fortune/fortune/fortune.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fortune/fortune/fortune.c b/fortune/fortune/fortune.c
index 117f9e03..495707c6 100644
--- a/fortune/fortune/fortune.c
+++ b/fortune/fortune/fortune.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fortune.c,v 1.40 2004/01/01 16:01:25 jsm Exp $ */
+/* $NetBSD: fortune.c,v 1.41 2004/01/01 16:02:07 jsm Exp $ */
/*-
* Copyright (c) 1986, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 1993\n\
#if 0
static char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: fortune.c,v 1.40 2004/01/01 16:01:25 jsm Exp $");
+__RCSID("$NetBSD: fortune.c,v 1.41 2004/01/01 16:02:07 jsm Exp $");
#endif
#endif /* not lint */
@@ -315,7 +315,7 @@ fortlen()
char line[BUFSIZ];
if (!(Fortfile->tbl.str_flags & (STR_RANDOM | STR_ORDERED)))
- nchar = (Seekpts[1] - Seekpts[0] <= SLEN);
+ nchar = Seekpts[1] - Seekpts[0];
else {
open_fp(Fortfile);
(void) fseek(Fortfile->inf, (long)Seekpts[0], SEEK_SET);