diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-03-15 13:46:35 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-15 13:46:35 -0700 |
commit | 4a1b9312f38222af6ef1f19b8551cfdeb47ad8df (patch) | |
tree | fd5fddba81875b45b82d756947a583af9ab50a19 | |
parent | d681bdcb63081d45495ffd3bb17c1bfa52ab98fa (diff) | |
download | subsurface-4a1b9312f38222af6ef1f19b8551cfdeb47ad8df.tar.gz |
Don't check for tank size information only on first tank
commit d681bdcb6308 ("Only use default cylinder for first one") has a
stupid bug in that it only calls get_tanksize for the first tank. That's
of course completely bogus.
Thanks to Linus for catching this.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | libdivecomputer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index c0c8e0bbb..d6f2d60b1 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -126,7 +126,7 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t /* for the first tank, if there is no tanksize available from the * dive computer, fill in the default tank information (if set) */ - if (i == 0 && !get_tanksize(devdata, data, dive->cylinder, i)) + if (!get_tanksize(devdata, data, dive->cylinder, i) && i == 0) fill_default_cylinder(&dive->cylinder[i]); } return DC_STATUS_SUCCESS; |