aboutsummaryrefslogtreecommitdiffstats
path: root/core/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/dive.h')
-rw-r--r--core/dive.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/dive.h b/core/dive.h
index 164886df6..981cdc0b9 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -499,7 +499,7 @@ static inline depth_t gas_mnd(struct gasmix *mix, depth_t end, struct dive *dive
pressure_t ppo2n2;
ppo2n2.mbar = depth_to_mbar(end.mm, dive);
- double maxambient = ppo2n2.mbar / (1 - get_he(mix) / 1000.0);
+ int maxambient = lrint(ppo2n2.mbar / (1 - get_he(mix) / 1000.0));
rounded_depth.mm = lrint(((double)mbar_to_depth(maxambient, dive)) / roundto) * roundto;
return rounded_depth;
}