summaryrefslogtreecommitdiffstats
path: root/src/apoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apoint.c')
-rw-r--r--src/apoint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 4796ae9..5813e42 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -443,7 +443,9 @@ apoint_scan (FILE *f, struct tm start, struct tm end, char state, char *note)
localtime (&t);
/* Read the appointment description */
- fgets (buf, sizeof buf, f);
+ if (!fgets (buf, sizeof buf, f))
+ return NULL;
+
newline = strchr (buf, '\n');
if (newline)
*newline = '\0';