summaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/profile.c')
-rw-r--r--core/profile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/profile.c b/core/profile.c
index 555f623cf..d9dbfed51 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -439,7 +439,7 @@ struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer
maxpressure = pressure;
if (heartbeat > maxhr)
maxhr = heartbeat;
- if (heartbeat < minhr)
+ if (heartbeat && heartbeat < minhr)
minhr = heartbeat;
if (depth > maxdepth)
@@ -469,7 +469,7 @@ struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer
if (minpressure > maxpressure)
minpressure = 0;
if (minhr > maxhr)
- minhr = 0;
+ minhr = maxhr;
memset(&pi, 0, sizeof(pi));
pi.maxdepth = maxdepth;