src/event.c: Fix event_inday()

Nasty off-by-one error here. An event should be associated with a day if
it starts at 12:00 a.m. and shouldn't be associated if it enters the
next day.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-10-06 12:25:46 +02:00
parent a2ec9bbf0d
commit 50ad339a22

View File

@ -115,7 +115,7 @@ event_new (char *mesg, char *note, long day, int id)
unsigned unsigned
event_inday (struct event *i, long start) event_inday (struct event *i, long start)
{ {
if (i->day <= start + DAYINSEC && i->day > start) if (i->day < start + DAYINSEC && i->day >= start)
{ {
return (1); return (1);
} }