Subject: Re: bin/20319
To: None <atatat@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-bugs
Date: 07/15/2005 05:07:02
The following reply was made to PR bin/20319; it has been noted by GNATS.
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/20319
Date: Thu, 14 Jul 2005 22:06:06 -0700 (PDT)
This appears to work better.
diff -b -u -r1.37 calendar.c
--- usr.bin/calendar/calendar.c 2 Jun 2005 01:39:24 -0000 1.37
+++ usr.bin/calendar/calendar.c 15 Jul 2005 05:02:31 -0000
@@ -256,7 +256,8 @@
if (flags & F_ISDAY || v1 > 12) {
/* found a day */
day = v1;
- month = tp->tm_mon + 1;
+ v2 = getfield(endp, &endp, &flags);
+ month = v2;
} else if (flags & F_ISMONTH) {
month = v1;
/* if no recognizable day, assume the first */
(By the way, why fall back to day 1?)