From 8f4b6cfcb9e439a0c1b304f8ffae38b079da8b0a Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 11 Oct 2023 22:15:02 +0200 Subject: [PATCH] Ignore not used cylinders in get_dive_gas Signed-off-by: Anton Lundin --- core/divelist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/divelist.c b/core/divelist.c index a7e52a0a7..a92eb82e9 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -43,6 +43,8 @@ void get_dive_gas(const struct dive *dive, int *o2_p, int *he_p, int *o2max_p) continue; if (cyl->cylinder_use == OXYGEN) continue; + if (cyl->cylinder_use == NOT_USED) + continue; if (o2 > maxo2) maxo2 = o2; if (he > maxhe)