aboutsummaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 52ec64517..b1739ad80 100644
--- a/dive.c
+++ b/dive.c
@@ -710,6 +710,11 @@ struct dive *try_to_merge(struct dive *a, struct dive *b)
res = alloc_dive();
res->when = a->when;
+ /* the larger tripflag is more relevant */
+ if(a->tripflag > b->tripflag)
+ res->tripflag = a->tripflag;
+ else
+ res->tripflag = b->tripflag;
MERGE_NONZERO(res, a, b, latitude);
MERGE_NONZERO(res, a, b, longitude);
MERGE_TXT(res, a, b, location);