summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dive.c b/dive.c
index b1739ad80..092153d8d 100644
--- a/dive.c
+++ b/dive.c
@@ -711,10 +711,13 @@ struct dive *try_to_merge(struct dive *a, struct dive *b)
res->when = a->when;
/* the larger tripflag is more relevant */
- if(a->tripflag > b->tripflag)
+ if(a->tripflag > b->tripflag) {
res->tripflag = a->tripflag;
- else
+ res->divetrip = a->divetrip;
+ } else {
res->tripflag = b->tripflag;
+ res->divetrip = b->divetrip;
+ }
MERGE_NONZERO(res, a, b, latitude);
MERGE_NONZERO(res, a, b, longitude);
MERGE_TXT(res, a, b, location);