summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-10-06 12:25:46 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-10-21 08:58:52 +0200
commit50ad339a228a779ae1284e21f98321268478669c (patch)
tree7fd57e50a62e921943a590aa35f889e9a162d24a
parenta2ec9bbf0d0f2d6e1a1b24025461e94956e14d6e (diff)
downloadcalcurse-50ad339a228a779ae1284e21f98321268478669c.tar.gz
calcurse-50ad339a228a779ae1284e21f98321268478669c.zip
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>
-rw-r--r--src/event.c2
1 files changed, 1 insertions, 1 deletions
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);
}