Handle bogus dates better.
[rsc] --rw-rw-r-- M 197601 glenda sys 5684 Nov 2 10:37 sys/src/cmd/ip/imap4d/date.c
/n/sourcesdump/2005/1102/plan9/sys/src/cmd/ip/imap4d/date.c:30,36 -
/n/sourcesdump/2005/1103/plan9/sys/src/cmd/ip/imap4d/date.c:30,36
if(tm->tzoff < 0)
plus = "";
m = 0;
- if(tm->wday != 8){
+ if(0 <= tm->wday && tm->wday < 7){
m = snprint(s, n, "%s, ", wdayname[tm->wday]);
if(m < 0)
return m;
|