diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2016-02-04 21:16:04 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-26 09:25:08 +0100 |
commit | 875a9035fb6678673dfe4d55467275176159673c (patch) | |
tree | 7f7f0259925643ae3b7a21b5328e15de75ff8faf | |
parent | 7e1ba8e9255891f2992dbef0501d40aa8d8b8191 (diff) | |
download | subsurface-875a9035fb6678673dfe4d55467275176159673c.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>
-rw-r--r-- | dive.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |