Commit a781479
committed
Do not allow adding open intervals with a future time
If an interval is started at a future time, as was possible with the
continue command when given a future time, subsequent commands could
fail if the end data was set to the current time.
Which would result in the following message:
Range.cpp:359: time_t Range::total() const: Assertion `is_open () || end >= start' failed.
This change makes it invalid to start an open interval in the future,
regardless of what command is validating the in the interval. However
it might still be possible to get in this case if the time on the system
jumps backward after starting an interval.
Reported by @kbcb
Related to #350
Closes #364
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>1 parent 02491f8 commit a781479
3 files changed
+24
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 43 | + | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
505 | 522 | | |
506 | 523 | | |
507 | 524 | | |
| |||
0 commit comments