mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Correctly find min o2 in get_dive_gas
When the import from a dive computer gives you 100% as the first gas, the get_dive_gas never finds which gas had the lowest o2 percent. This fixes the logic to find the lowest o2 percent in any dive cylinder list. Signed-off-by: Anton Lundin <glance@ac2.se>
This commit is contained in:
parent
8f4b6cfcb9
commit
725b70e64c
1 changed files with 2 additions and 0 deletions
|
@ -47,6 +47,8 @@ void get_dive_gas(const struct dive *dive, int *o2_p, int *he_p, int *o2max_p)
|
|||
continue;
|
||||
if (o2 > maxo2)
|
||||
maxo2 = o2;
|
||||
if (o2 < mino2)
|
||||
mino2 = o2;
|
||||
if (he > maxhe)
|
||||
goto newmax;
|
||||
if (he < maxhe)
|
||||
|
|
Loading…
Reference in a new issue