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:
Dirk Hohndel 2014-11-11 01:41:08 -08:00
parent 116615857c
commit 5c69f94bca

View file

@ -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);