mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixed get_gas_at_time for equal times
This fixes a subtle bug introduced in 5c4569247a which
unified two functions finding the gasmix at a given time
during the dive. There was a slight difference, though:
Does a gaschange exactly at that time count or not? For
the planner to work, the answer has to be in the affirmative.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
a0cc02dfe8
commit
d9f2b537af
3 changed files with 78 additions and 1 deletions
|
|
@ -4447,7 +4447,7 @@ struct gasmix get_gasmix(const struct dive *dive, const struct divecomputer *dc,
|
|||
res = gasmix;
|
||||
}
|
||||
|
||||
while (ev && ev->time.seconds < time) {
|
||||
while (ev && ev->time.seconds <= time) {
|
||||
res = get_gasmix_from_event(dive, ev);
|
||||
ev = get_next_event(ev->next, "gaschange");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue