diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-03-13 12:57:55 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-03-13 12:57:55 +0100 |
commit | 2030a0563ca0b9e4a66a0721dc708af8f5401e22 (patch) | |
tree | 471e60d6cfe14c155c9b98b658caa927a381cfd6 | |
parent | 0e5a9f16201a926856668b3c6b2be1c69696009d (diff) | |
download | calcurse-2030a0563ca0b9e4a66a0721dc708af8f5401e22.zip |
Parse appointment end times correctly if they date back.
End times used to be parsed incorrectly if start and end time's hour
components were equal, but the end time was smaller than the start time.
This is fixed by comparing the minute components as well in case of
equal hour components.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rw-r--r-- | src/apoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apoint.c b/src/apoint.c index 427c43f..38b41ae 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -228,7 +228,7 @@ apoint_add (void) else if (check_time (item_time) == 1) { (void)sscanf (item_time, "%u:%u", &end_h, &end_m); - if (end_h < heures) + if (end_h < heures || ((end_h == heures) && (end_m < minutes))) { apoint_duration = MININSEC - minutes + end_m + (24 + end_h - (heures + 1)) * MININSEC; |