summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-04 20:33:17 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-04 20:33:17 -0700
commit0e29df87f43365309f89d6dbd5b4a3acd8ea5054 (patch)
treedb523a759f2cad27a3eb0c6cbbb7d69cd01cdbbe /dive.c
parent7a7b58340d75c6c81e28a2365694faa992df4242 (diff)
downloadsubsurface-0e29df87f43365309f89d6dbd5b4a3acd8ea5054.tar.gz
Make the dive merging code more tolerant
Depending on the tool used to import a dive from the uemis Zurich we end up with different time stamps for the dive - just by a few seconds, but the existing code insisted on an exact match. We now allow for up to 60 seconds in difference and still consider two dives as the same. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dive.c b/dive.c
index 9af6449e2..deb72fc80 100644
--- a/dive.c
+++ b/dive.c
@@ -410,7 +410,7 @@ struct dive *try_to_merge(struct dive *a, struct dive *b)
int i;
struct dive *res;
- if (a->when != b->when)
+ if ((a->when >= b->when + 60) || (a->when <= b->when - 60))
return NULL;
res = alloc_dive();