Date: Sun, 8 Aug 2004 20:44:57 +0200 (CEST) From: Martin Kulas <coolaz@web.de> To: FreeBSD-gnats-submit@FreeBSD.org Cc: localtux@yahoo.de Subject: bin/70182: [patch] fortune -e implementation bug Message-ID: <200408081844.i78IivOs000684@thunderBSD.tld> Resent-Message-ID: <200408081910.i78JA7sU010692@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 70182 >Category: bin >Synopsis: [patch] fortune -e implementation bug >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 08 19:10:07 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Martin Kulas >Release: FreeBSD 4.10-RELEASE i386 >Organization: None >Environment: System: FreeBSD 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Sat Jun 19 23:12:40 CEST 2004 i386 >Description: If I type ``fortune -e murphy startrek'' several times, ich will get only messages from ``murphy'' but not from ``startrek''. If I understand the ``-e'' flag correctly, this flag should treat all fortune files equally. >How-To-Repeat: Just type ``fortune -e murphy startrek'' and you will not get any message from ``startrek''. >Fix: Apply the following patch: <patch> --- fortune.c.orig Fri Aug 6 15:13:28 2004 +++ fortune.c Sun Aug 8 00:51:38 2004 @@ -933,7 +933,7 @@ if (num_noprob > 1) { frac = percent / num_noprob; DPRINTF(1, (stderr, ", frac = %d%%", frac)); - for (fp = File_list; fp != last; fp = fp->next) + for (fp = File_tail; fp != last; fp = fp->prev) if (fp->percent == NO_PROB) { fp->percent = frac; percent -= frac; </patch> Now ``murphy'' and ``startrek'' are treated equally. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408081844.i78IivOs000684>