diff options
Diffstat (limited to 'src/apoint.c')
-rw-r--r-- | src/apoint.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/apoint.c b/src/apoint.c index 889c371..ca400e9 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -165,6 +165,12 @@ struct apoint *apoint_scan(FILE * f, struct tm start, struct tm end, char state, char buf[BUFSIZ], *newline; time_t tstart, tend; + EXIT_IF(!check_date(start.tm_year, start.tm_mon, start.tm_mday) || + !check_date(end.tm_year, end.tm_mon, end.tm_mday) || + !check_time(start.tm_hour, start.tm_min) || + !check_time(end.tm_hour, end.tm_min), + _("date error in appointment")); + /* Read the appointment description */ if (!fgets(buf, sizeof buf, f)) return NULL; |