profile: Fix so min pressure is not always 0

Signed-off-by: Michael Andreen <michael@andreen.dev>
This commit is contained in:
Michael Andreen 2023-05-22 22:34:01 +02:00 committed by Robert C. Helling
parent 7217506072
commit 9e95746797

View file

@ -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;
}