summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dive.c b/dive.c
index 950948b59..c07912ebd 100644
--- a/dive.c
+++ b/dive.c
@@ -678,7 +678,8 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc)
if (asc_desc_time * 2 >= duration)
asc_desc_time = duration/2;
- dc->meandepth.mm = depth*(duration-asc_desc_time)/duration;
+ if (!dc->meandepth.mm)
+ dc->meandepth.mm = depth*(duration-asc_desc_time)/duration;
if (depth > maxdepth)
maxdepth = depth;
} else {