aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2019-06-01 20:34:08 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2019-06-03 18:42:52 -0400
commite6099b2d59dfed9f7419f516e09952005f283dd5 (patch)
tree277f5a1d313740b53d1fc46863a1f29f42cfd56f
parent2f348a92929604afc40cb8852a3d5a38e7ac3252 (diff)
downloadcalcurse-e6099b2d59dfed9f7419f516e09952005f283dd5.tar.gz
calcurse-e6099b2d59dfed9f7419f516e09952005f283dd5.zip
Fix recurrent appointment end time when duration is zero
Fixes a regression introduced in 223810c (Major overhaul of appointment/event input routines., 2017-11-06) and 16d3032 (Refactoring update_duration/day_edit_duration., 2017-10-18). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/ui-day.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/ui-day.c b/src/ui-day.c
index 7774764..5907490 100644
--- a/src/ui-day.c
+++ b/src/ui-day.c
@@ -209,15 +209,10 @@ static void update_duration(time_t *start, long *dur)
unsigned newdur;
char *timestr, *outstr;
- if (*dur > 0) {
- end = *start + *dur;
- asprintf(&outstr, "%s %s", DATEFMT(conf.input_datefmt), "%H:%M");
- timestr = date_sec2date_str(end, outstr);
- mem_free(outstr);
- } else {
- timestr = mem_strdup("");
- }
-
+ end = *start + *dur;
+ asprintf(&outstr, "%s %s", DATEFMT(conf.input_datefmt), "%H:%M");
+ timestr = date_sec2date_str(end, outstr);
+ mem_free(outstr);
for (;;) {
int ret, early = 0;
status_mesg(msg_time, "");