summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2016-07-19 11:14:51 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-07-21 20:00:04 +0900
commitc27ad52be4fd81eb77491e5d85addd1c907cc32d (patch)
treee3e82021715bf08a517bf65a71616aaaa734e461
parentb2f2a865eb55f13fb20313eaa7b7785e019a58f7 (diff)
downloadsubsurface-c27ad52be4fd81eb77491e5d85addd1c907cc32d.tar.gz
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 <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--core/dive.c2
1 files changed, 2 insertions, 0 deletions
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)