summaryrefslogtreecommitdiff
path: root/src/ui-day.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui-day.c')
-rw-r--r--src/ui-day.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui-day.c b/src/ui-day.c
index 647d038..a9dca9a 100644
--- a/src/ui-day.c
+++ b/src/ui-day.c
@@ -476,6 +476,10 @@ void ui_day_item_add(void)
if (getstring(win[STA].p, item_time, LDUR, 0, 1) ==
GETSTRING_ESC)
return;
+ if (strlen(item_time) == 0) {
+ apoint_duration = 0;
+ break;
+ }
if (*item_time == '+'
&& parse_duration(item_time + 1,
&apoint_duration) == 1)