diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-11-11 01:41:08 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-11 01:41:08 -0800 |
commit | 5c69f94bcade3f9c83ec27be449e4babc1aa1ae0 (patch) | |
tree | e62ab5144c30dcf831102035d677c6d2abec3564 /libdivecomputer.c | |
parent | 116615857c8903ad84c3ec371d42183a355fca6d (diff) | |
download | subsurface-5c69f94bcade3f9c83ec27be449e4babc1aa1ae0.tar.gz |
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>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r-- | libdivecomputer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index 981061ba5..08a7f2800 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -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); |