summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-31 13:49:51 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-31 13:49:51 -0700
commitb9946b89fa3663318ac947778dbf701b1e4ebde0 (patch)
treeddaf2e232136953af07a15cf86b827159dab465b
parent738c472daf76cde95f61c4b9a615af82b01e60d3 (diff)
downloadsubsurface-b9946b89fa3663318ac947778dbf701b1e4ebde0.tar.gz
Planner: look harder to find the right gas
Silly bug - while we normally fill the cylinders in a tight group with no "null" cylinders in the middle, since we copy from an existing dive and since that may end up with an odd sequence of cylinders, we need to continue looking at ALL cylinders and not stop with the first one that's empty. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--planner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/planner.c b/planner.c
index 405b07e02..1feb8467d 100644
--- a/planner.c
+++ b/planner.c
@@ -209,7 +209,7 @@ static int verify_gas_exists(struct dive *dive, int o2, int he)
cyl = dive->cylinder + i;
mix = &cyl->gasmix;
if (cylinder_nodata(cyl))
- break;
+ continue;
if (gasmix_distance(mix, &mix_in) < 200)
return i;
}