diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-11-13 22:38:14 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-13 22:38:14 +0900 |
commit | bb041069a35d2ae8dee81d9b0e37bde1b289920d (patch) | |
tree | 7f4ecfe85672d390585e62558748838341be86d6 /qt-ui/diveplanner.cpp | |
parent | c18464b44f157c9bbea69bb479dc3282237ad3a3 (diff) | |
download | subsurface-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.cpp | 2 |
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; |