From 228eb6ce27ff67d719282457e6afca186071ff74 Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Tue, 23 Jun 2015 23:04:02 +1000 Subject: Fix gaschange_after definition Previously gaschange_after was never being set back to false. Now it will be. Signed-off-by: Rick Walsh Signed-off-by: Dirk Hohndel --- planner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/planner.c b/planner.c index 227125016..fc4275b4b 100644 --- a/planner.c +++ b/planner.c @@ -594,8 +594,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool continue; len = strlen(buffer); - if (nextdp && (gasmix_distance(&gasmix, &newgasmix) || dp->setpoint != nextdp->setpoint)) - gaschange_after = true; + gaschange_after = (nextdp && (gasmix_distance(&gasmix, &newgasmix) || dp->setpoint != nextdp->setpoint)); gaschange_before = (gasmix_distance(&lastprintgasmix, &gasmix) || lastprintsetpoint != dp->setpoint); if (plan_verbatim) { if (dp->depth != lastprintdepth) { -- cgit v1.2.3-70-g09d2