summaryrefslogtreecommitdiffstats
path: root/ostctools.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 21:58:10 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 21:58:10 -0700
commit99bcdb3f30c5e9dffaf2bf037b72ee596d6c6908 (patch)
treed9ff97e302b6f65f2c268954cf41a810c9109b8e /ostctools.c
parent66375689b8cd110355656203979f5640ecf05193 (diff)
downloadsubsurface-99bcdb3f30c5e9dffaf2bf037b72ee596d6c6908.tar.gz
OSTC tools: prevent unknown dc family
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'ostctools.c')
-rw-r--r--ostctools.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/ostctools.c b/ostctools.c
index 9e72453da..84af67d88 100644
--- a/ostctools.c
+++ b/ostctools.c
@@ -109,16 +109,19 @@ void ostctools_import(const char *file, struct dive_table *divetable)
// Try to determine the dc family based on the header type
switch (buffer[2]) {
- case 0x20:
- case 0x21:
- dc_fam = DC_FAMILY_HW_OSTC;
- break;
- case 0x22:
- dc_fam = DC_FAMILY_HW_FROG;
- break;
- case 0x23:
- dc_fam = DC_FAMILY_HW_OSTC3;
- break;
+ case 0x20:
+ case 0x21:
+ dc_fam = DC_FAMILY_HW_OSTC;
+ break;
+ case 0x22:
+ dc_fam = DC_FAMILY_HW_FROG;
+ break;
+ case 0x23:
+ dc_fam = DC_FAMILY_HW_OSTC3;
+ break;
+ default:
+ fprintf(stderr, "got unknown dc family %x\n", buffer[2]);
+ dc_fam = DC_FAMILY_NULL;
}
// Prepare data to pass to libdivecomputer. OSTC protocol doesn't include