From 2c555a73bbf854397a4a373aa60192c2cf2df00a Mon Sep 17 00:00:00 2001 From: jsm Date: Thu, 1 Jan 2004 16:02:07 +0000 Subject: 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 . --- fortune/fortune/fortune.c | 6 +++--- 1 file 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); -- cgit v1.2.3-56-ge451