Commit f3db5ff
Fix cover_travel_time() overflow for travel times > 65 s
cover_travel_time() returned uint16_t but multiplied open_time/close_time
(which are stored in tenths of a second) by 100 to convert to milliseconds.
For travel times above 65.5 s (655 tenths), the result exceeded 65535 and
silently wrapped. A 66 s travel time (660 tenths) would produce 464 ms
instead of 66000 ms.
Co-authored-by: yarfalksol <285298507+yarfalksol@users.noreply.github.com>1 parent 0564bee commit f3db5ff
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
0 commit comments