From 24e2f83d67654f36da8f83a8be3f6dcac0a74c20 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Thu, 4 Feb 2016 21:16:04 +0200 Subject: Allow merging of dives with zero depth/duration Fixes #1003 Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- subsurface-core/dive.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'subsurface-core/dive.c') diff --git a/subsurface-core/dive.c b/subsurface-core/dive.c index 9af63791a..fd0d25989 100644 --- a/subsurface-core/dive.c +++ b/subsurface-core/dive.c @@ -2162,6 +2162,9 @@ static int find_sample_offset(struct divecomputer *a, struct divecomputer *b) */ static int similar(unsigned long a, unsigned long b, unsigned long expected) { + if (!a && !b) + return 1; + if (a && b) { unsigned long min, max, diff; -- cgit v1.2.3-70-g09d2