From 6ce4aeb04ee4a01af43f18ef8b76224402cb5c3b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 6 Aug 2019 08:08:35 +0200 Subject: 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 --- core/planner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/planner.c') 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 */ -- cgit v1.2.3-70-g09d2