mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:23:24 +00:00
Don't check for tank size information only on first tank
commit d681bdcb63
("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>
This commit is contained in:
parent
d681bdcb63
commit
4a1b9312f3
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue