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:
parent
2f348a9292
commit
e6099b2d59
13
src/ui-day.c
13
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, "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user