diff options
author | Salvador Cuñat <salvador.cunat@gmail.com> | 2016-01-07 23:21:28 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-07 18:40:20 -0800 |
commit | ce3a78efcac2c9b6bd215bc191560a64c54fd628 (patch) | |
tree | 1da778c12c8c6bd62ae9eb0d02d399b8f1142d7f /subsurface-core/dive.c | |
parent | 0f311020205563823c71cfb68a77d156b14d352a (diff) | |
download | subsurface-ce3a78efcac2c9b6bd215bc191560a64c54fd628.tar.gz |
Assign lower number to a merged dive instead of higher one
At the moment, if we have, say, dives ... 100, 101 and 102 and we merge 101 and
102, we get a list numbered ... 99, 100, 102. This is, probably, an
undesired behavior. The patch simple chooses lower of both dive numbers instead
of higher one.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/dive.c')
-rw-r--r-- | subsurface-core/dive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subsurface-core/dive.c b/subsurface-core/dive.c index f0baf076a..9af63791a 100644 --- a/subsurface-core/dive.c +++ b/subsurface-core/dive.c @@ -2856,7 +2856,7 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer MERGE_TXT(res, a, b, divemaster); MERGE_MAX(res, a, b, rating); MERGE_TXT(res, a, b, suit); - MERGE_MAX(res, a, b, number); + MERGE_MIN(res, a, b, number); MERGE_NONZERO(res, a, b, cns); MERGE_NONZERO(res, a, b, visibility); MERGE_NONZERO(res, a, b, picture_list); |