diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-06 08:08:35 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-08-08 16:26:31 -0700 |
commit | 6ce4aeb04ee4a01af43f18ef8b76224402cb5c3b (patch) | |
tree | 9fe87800b99402b89213d5e6b0a6d862f15b6363 | |
parent | ddff68ddaec734449d83c6b056739c5474fb0b49 (diff) | |
download | subsurface-6ce4aeb04ee4a01af43f18ef8b76224402cb5c3b.tar.gz |
Planner: use planner's dive in interpolate_transition()
Instead of passing the global displayed_dive to
calc_crushing_pressure(), use the dive the planner is working on.
A small step in making the planner thread-safe.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | core/planner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/planner.c b/core/planner.c index e2c5cf035..407418553 100644 --- a/core/planner.c +++ b/core/planner.c @@ -102,7 +102,7 @@ static void interpolate_transition(struct deco_state *ds, struct dive *dive, dur add_segment(ds, depth_to_bar(depth, dive), gasmix, 1, po2.mbar, divemode, prefs.bottomsac); } if (d1.mm > d0.mm) - calc_crushing_pressure(ds, depth_to_bar(d1.mm, &displayed_dive)); + calc_crushing_pressure(ds, depth_to_bar(d1.mm, dive)); } /* returns the tissue tolerance at the end of this (partial) dive */ |