Divinglog import: ignore unsupported cylinders

Subsurface supports currently 8 cylinders, thus we should not attempt to
add more.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-08-02 18:36:38 +03:00 committed by Dirk Hohndel
parent 30bdc83105
commit abbebef997

View file

@ -2851,6 +2851,14 @@ extern int divinglog_cylinder(void *handle, int columns, char **data, char **col
short dbl = 1;
//char get_cylinder_template[] = "select TankID,TankSize,PresS,PresE,PresW,O2,He,DblTank from Tank where LogID = %d";
/*
* Divinglog might have more cylinders than what we support. So
* better to ignore those.
*/
if (cur_cylinder_index >= MAX_CYLINDERS)
return 0;
if (data[7] && atoi(data[7]) > 0)
dbl = 2;