mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
c18464b44f
commit
bb041069a3
1 changed files with 1 additions and 1 deletions
|
@ -1132,11 +1132,11 @@ bool divePointsLessThan(const divedatapoint& p1, const divedatapoint& p2)
|
||||||
|
|
||||||
bool DivePlannerPointsModel::addGas(int o2, int he)
|
bool DivePlannerPointsModel::addGas(int o2, int he)
|
||||||
{
|
{
|
||||||
cylinder_t *cyl = stagingDive->cylinder;
|
|
||||||
if (is_air(o2, he))
|
if (is_air(o2, he))
|
||||||
o2 = 0;
|
o2 = 0;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_CYLINDERS; i++) {
|
for (int i = 0; i < MAX_CYLINDERS; i++) {
|
||||||
|
cylinder_t *cyl = &stagingDive->cylinder[i];
|
||||||
if (cylinder_nodata(cyl)) {
|
if (cylinder_nodata(cyl)) {
|
||||||
fill_default_cylinder(cyl);
|
fill_default_cylinder(cyl);
|
||||||
cyl->gasmix.o2.permille = o2;
|
cyl->gasmix.o2.permille = o2;
|
||||||
|
|
Loading…
Add table
Reference in a new issue