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>
This commit is contained in:
Miika Turkia 2016-02-04 21:16:04 +02:00 committed by Dirk Hohndel
parent 545b106d5c
commit 24e2f83d67

View file

@ -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;