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>
This commit is contained in:
Dirk Hohndel 2014-05-31 13:49:51 -07:00
parent 738c472daf
commit b9946b89fa

View file

@ -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;
}