diff --git a/core/dive.c b/core/dive.c index e96036611..a4a47ab90 100644 --- a/core/dive.c +++ b/core/dive.c @@ -2614,7 +2614,6 @@ struct dive *merge_dives(const struct dive *a, const struct dive *b, int offset, MERGE_MAX(res, a, b, rating); MERGE_TXT(res, a, b, suit, ", "); MERGE_MAX(res, a, b, number); - MERGE_NONZERO(res, a, b, cns); MERGE_NONZERO(res, a, b, visibility); copy_pictures(a->pictures.nr ? &a->pictures : &b->pictures, &res->pictures); taglist_merge(&res->tag_list, a->tag_list, b->tag_list); @@ -2631,6 +2630,9 @@ struct dive *merge_dives(const struct dive *a, const struct dive *b, int offset, else join_dive_computers(res, &res->dc, &a->dc, &b->dc, cylinders_map_a, cylinders_map_b, 0); + /* The CNS values will be recalculated from the sample in fixup_dive() */ + res->cns = res->maxcns = 0; + /* we take the first dive site, unless it's empty */ *site = a->dive_site && !dive_site_is_empty(a->dive_site) ? a->dive_site : b->dive_site; fixup_dive(res);