Subject: Re: bin/30107: [PATCH] calendar reports non-matching days.
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Johan Veenhuizen <veenhuizen@users.sourceforge.net>
List: netbsd-bugs
Date: 05/14/2006 09:40:18
The following reply was made to PR bin/30107; it has been noted by GNATS.
From: Johan Veenhuizen <veenhuizen@users.sourceforge.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/30107: [PATCH] calendar reports non-matching days.
Date: Sun, 14 May 2006 11:39:02 +0200
Seems like somebody committed a fix for this bug after all.
Unfortunately, the fix intruduces a new bug. Please apply the
following patch.
Johan
Index: calendar.c
===================================================================
RCS file: /cvsroot/src/usr.bin/calendar/calendar.c,v
retrieving revision 1.39
diff -u -r1.39 calendar.c
--- calendar.c 24 Mar 2006 23:30:08 -0000 1.39
+++ calendar.c 14 May 2006 09:35:15 -0000
@@ -279,7 +279,7 @@
if ((flags & F_WILDMONTH) && (flags & F_WILDDAY))
return (1);
- if ((flags & F_WILDMONTH) && (flags & F_ISDAY))
+ if ((flags & F_WILDMONTH) && (flags & F_ISDAY) && (day == tp->tm_mday))
return (1);
if (((flags & F_ISMONTH) && (flags & F_WILDDAY)) && (month == tp->tm_mon + 1))