From 50ad339a228a779ae1284e21f98321268478669c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 6 Oct 2011 12:25:46 +0200 Subject: 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 --- src/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event.c b/src/event.c index 6c7e70f..6338c7e 100644 --- a/src/event.c +++ b/src/event.c @@ -115,7 +115,7 @@ event_new (char *mesg, char *note, long day, int id) unsigned 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); } -- cgit v1.2.3-54-g00ecf