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,7 +126,7 @@ static void update_duration(long *start, long *dur)
|
|||||||
{
|
{
|
||||||
unsigned newdur;
|
unsigned newdur;
|
||||||
|
|
||||||
day_edit_duration(*start, *dur, &newdur);
|
if (day_edit_duration(*start, *dur, &newdur))
|
||||||
*dur = newdur;
|
*dur = newdur;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user