From 5b5cab2905aea4d97e3c6d6aa13455d63faf975c Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 10 Sep 2017 11:39:25 +0300 Subject: Do not merge dives with zero duration As these are probably manually entered dives with incomplete data, it is better not to merge them. See #561 Signed-off-by: Miika Turkia --- core/dive.c | 1 + 1 file changed, 1 insertion(+) (limited to 'core') diff --git a/core/dive.c b/core/dive.c index 7f89e5063..0b0cbd671 100644 --- a/core/dive.c +++ b/core/dive.c @@ -2645,6 +2645,7 @@ static int likely_same_dive(struct dive *a, struct dive *b) */ if (!similar(a->maxdepth.mm, b->maxdepth.mm, 1000) || (a->meandepth.mm && b->meandepth.mm && !similar(a->meandepth.mm, b->meandepth.mm, 1000)) || + !a->duration.seconds || !b->duration.seconds || !similar(a->duration.seconds, b->duration.seconds, 5 * 60)) return 0; -- cgit v1.2.3-70-g09d2