mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Bugfix first deco stop finder
The previous code checked against the current depth to find the next deco stop, not the ceiling we actually should head for. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4696354f4b
commit
70a9c280f4
1 changed files with 1 additions and 1 deletions
|
@ -635,7 +635,7 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, b
|
|||
if (depth == 0 && ceiling == 0) /* we are done here */
|
||||
goto done;
|
||||
for (stopidx = 0; stopidx < sizeof(decostoplevels) / sizeof(int); stopidx++)
|
||||
if (decostoplevels[stopidx] >= depth)
|
||||
if (decostoplevels[stopidx] >= ceiling)
|
||||
break;
|
||||
if (stopidx > 0)
|
||||
stopidx--;
|
||||
|
|
Loading…
Add table
Reference in a new issue