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>
This commit is contained in:
Lars Henriksen 2019-06-01 20:34:08 +02:00 committed by Lukas Fleischer
parent 2f348a9292
commit e6099b2d59

View File

@ -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, "");