aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2021-05-07 10:05:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-05-07 08:16:41 -0700
commit09bbd846da2289a49e566c6b2742b62d9d7bdc79 (patch)
tree6218ff79fef1e9e998ab5e93b8ddeee60bf64faa /core
parent3e1ade5206853bbd95023ae79e62b5c608003352 (diff)
downloadsubsurface-09bbd846da2289a49e566c6b2742b62d9d7bdc79.tar.gz
The planner should not always ascent from the depth of
the last manually entered waypoint but consider the possibility that it should first top where we are before the next stop depth has cleared. Reported-by: David Carron Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core')
-rw-r--r--core/planner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/planner.c b/core/planner.c
index be257a0a0..98c75df1e 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -757,7 +757,7 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
/* Find the first potential decostopdepth above current depth */
for (stopidx = 0; stopidx < decostoplevelcount; stopidx++)
- if (*(decostoplevels + stopidx) >= depth)
+ if (decostoplevels[stopidx] > depth)
break;
if (stopidx > 0)
stopidx--;