From a08aefac43a83e4801b3cfc57a84e81352921952 Mon Sep 17 00:00:00 2001
From: Rick Walsh <[email protected]>
Date: Tue, 23 Jun 2015 23:04:02 +1000
Subject: [PATCH] Fix gaschange_after definition

Previously gaschange_after was never being set back to false.  Now it will be.

Signed-off-by: Rick Walsh <[email protected]>
---
 planner.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/planner.c b/planner.c
index 2271250..fc4275b 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) {
-- 
2.4.3

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to