Skip duration update if the prompt is canceled
Do not update an appointment's duration if the user cancels the prompt at day_edit_duration(). Note that day_edit_duration() does not touch the buffer if the prompt was canceled or an invalid value was entered, resulting in the buffer variable being uninitialized in these cases. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
2ea91e1a8a
commit
217e66729a
@ -126,8 +126,8 @@ static void update_duration(long *start, long *dur)
|
||||
{
|
||||
unsigned newdur;
|
||||
|
||||
day_edit_duration(*start, *dur, &newdur);
|
||||
*dur = newdur;
|
||||
if (day_edit_duration(*start, *dur, &newdur))
|
||||
*dur = newdur;
|
||||
}
|
||||
|
||||
static void update_desc(char **desc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user