diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | core/planner.c | 2 | ||||
-rw-r--r-- | tests/testplan.cpp | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5270b9abc..0e6dd2928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ export: show progress dialog when exporting to TeX printing: use sensible font size even for strange window size +* Planner: Don't immediately ascent automatically --- * Always add new entries at the very top of this file above other existing entries and this note. 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--; diff --git a/tests/testplan.cpp b/tests/testplan.cpp index 131c559ed..a7a42e56a 100644 --- a/tests/testplan.cpp +++ b/tests/testplan.cpp @@ -472,7 +472,7 @@ void TestPlan::testImperial() struct divedatapoint *dp = testPlan.dp; while (!dp->minimum_gas.mbar && dp->next) dp = dp->next; - QCOMPARE(lrint(dp->minimum_gas.mbar / 1000.0), 154l); + QCOMPARE(lrint(dp->minimum_gas.mbar / 1000.0), 155l); // check first gas change to EAN36 at 33m struct event *ev = displayed_dive.dc.events; QVERIFY(ev != NULL); |