From c27ad52be4fd81eb77491e5d85addd1c907cc32d Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 19 Jul 2016 11:14:51 +0900 Subject: Properly pick cylinder use when merging dives The cylinder use field was not merged when dives were merged. This is normally not noticeable, since hopefully the cylinder use should be the same anyway, but when re-downloading the dives from the EON Steel after updating it to also get cylinder use data, the dive merging threw the data away again since the original dive lacked it. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- core/dive.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core') diff --git a/core/dive.c b/core/dive.c index 04cad24f8..d6fe0c8c4 100644 --- a/core/dive.c +++ b/core/dive.c @@ -1864,6 +1864,8 @@ static void merge_cylinder_info(cylinder_t *src, cylinder_t *dst) merge_cylinder_mix(&src->gasmix, &dst->gasmix); MERGE_MAX(dst, dst, src, start.mbar); MERGE_MIN(dst, dst, src, end.mbar); + if (!dst->cylinder_use) + dst->cylinder_use = src->cylinder_use; } static void merge_weightsystem_info(weightsystem_t *res, weightsystem_t *a, weightsystem_t *b) -- cgit v1.2.3-70-g09d2