Fix addGas to look at the correct cylinder

That was a stupid bug. You have to actually update the variable to look at
the right cylinder. Duh.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-13 22:38:14 +09:00
parent c18464b44f
commit bb041069a3

View file

@ -1132,11 +1132,11 @@ bool divePointsLessThan(const divedatapoint& p1, const divedatapoint& p2)
bool DivePlannerPointsModel::addGas(int o2, int he)
{
cylinder_t *cyl = stagingDive->cylinder;
if (is_air(o2, he))
o2 = 0;
for (int i = 0; i < MAX_CYLINDERS; i++) {
cylinder_t *cyl = &stagingDive->cylinder[i];
if (cylinder_nodata(cyl)) {
fill_default_cylinder(cyl);
cyl->gasmix.o2.permille = o2;