mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Have get_dive_gas return air when without cylinders
If we called get_dive_gas on a dive without cylinders, we returned 100%, which is quite wrong. This makes us return air as default gas instead. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6b3e361e90
commit
58173d711c
1 changed files with 2 additions and 1 deletions
|
@ -134,7 +134,8 @@ void get_dive_gas(struct dive *dive, int *o2_p, int *he_p, int *o2max_p)
|
|||
mino2 = o2;
|
||||
}
|
||||
/* All air? Show/sort as "air"/zero */
|
||||
if (!maxhe && maxo2 == O2_IN_AIR && mino2 == maxo2)
|
||||
if ((!maxhe && maxo2 == O2_IN_AIR && mino2 == maxo2) ||
|
||||
(maxo2 == -1 && maxhe == -1 && mino2 == 1000))
|
||||
maxo2 = mino2 = 0;
|
||||
*o2_p = mino2;
|
||||
*he_p = maxhe;
|
||||
|
|
Loading…
Reference in a new issue