From 5c69f94bcade3f9c83ec27be449e4babc1aa1ae0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 11 Nov 2014 01:41:08 -0800 Subject: 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 Signed-off-by: Dirk Hohndel --- libdivecomputer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libdivecomputer.c') 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); -- cgit v1.2.3-70-g09d2