diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2016-02-04 21:16:04 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-04 12:38:48 -0800 |
commit | 24e2f83d67654f36da8f83a8be3f6dcac0a74c20 (patch) | |
tree | 65b6350dd09dc04565237d87eda33722554a5703 /subsurface-core | |
parent | 545b106d5cacc1e773bd26be9bed92fe84163d1d (diff) | |
download | subsurface-24e2f83d67654f36da8f83a8be3f6dcac0a74c20.tar.gz |
Allow merging of dives with zero depth/duration
Fixes #1003
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core')
-rw-r--r-- | subsurface-core/dive.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |