diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-10-04 20:33:17 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2011-10-04 20:33:17 -0700 |
commit | 0e29df87f43365309f89d6dbd5b4a3acd8ea5054 (patch) | |
tree | db523a759f2cad27a3eb0c6cbbb7d69cd01cdbbe /dive.c | |
parent | 7a7b58340d75c6c81e28a2365694faa992df4242 (diff) | |
download | subsurface-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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(); |