summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-13 22:38:14 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-13 22:38:14 +0900
commitbb041069a35d2ae8dee81d9b0e37bde1b289920d (patch)
tree7f4ecfe85672d390585e62558748838341be86d6 /qt-ui/diveplanner.cpp
parentc18464b44f157c9bbea69bb479dc3282237ad3a3 (diff)
downloadsubsurface-bb041069a35d2ae8dee81d9b0e37bde1b289920d.tar.gz
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>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 6bc67ada0..06d7ae9d1 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -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;