mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix getting tank information from libdivecomputer
Silly type made us always get tank 0. So tanks 1 through n where wrong (and repeating tank 0 instead). Reported-by: Jef Driesen <jef@libdivecomputer.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
116615857c
commit
5c69f94bca
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t
|
|||
#if DC_VERSION_CHECK(0, 5, 0) && defined(DC_GASMIX_UNKNOWN)
|
||||
tank.volume = 0.0;
|
||||
if (i < ntanks) {
|
||||
rc = dc_parser_get_field(parser, DC_FIELD_TANK, 0, &tank);
|
||||
rc = dc_parser_get_field(parser, DC_FIELD_TANK, i, &tank);
|
||||
if (rc == DC_STATUS_SUCCESS) {
|
||||
if (tank.type == DC_TANKVOLUME_IMPERIAL) {
|
||||
dive->cylinder[i].type.size.mliter = rint(tank.volume * 1000);
|
||||
|
|
Loading…
Add table
Reference in a new issue