From 9e9574679787ce33046b694e75b4a77e0f5923e9 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Mon, 22 May 2023 22:34:01 +0200 Subject: [PATCH] profile: Fix so min pressure is not always 0 Signed-off-by: Michael Andreen --- core/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/profile.c b/core/profile.c index 06ff15a78..49297c067 100644 --- a/core/profile.c +++ b/core/profile.c @@ -282,7 +282,7 @@ static void calculate_max_limits_new(const struct dive *dive, const struct divec int mbar_end = get_cylinder(dive, cyl)->end.mbar; if (mbar_start > maxpressure) maxpressure = mbar_start; - if (mbar_end < minpressure) + if (mbar_end && mbar_end < minpressure) minpressure = mbar_end; }