summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r--libdivecomputer.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c
index 8add6fdf6..22df874fe 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -116,11 +116,14 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t
he = rint(gasmix.helium * 1000);
/* Ignore bogus data - libdivecomputer does some crazy stuff */
- if (o2 + he <= O2_IN_AIR || o2 > 1000)
+ if (o2 + he <= O2_IN_AIR || o2 > 1000) {
+ report_error("unlikely dive gas data from libdivecomputer: o2 = %d he = %d", o2, he);
o2 = 0;
- if (he < 0 || o2 + he > 1000)
+ }
+ if (he < 0 || o2 + he > 1000) {
+ report_error("unlikely dive gas data from libdivecomputer: o2 = %d he = %d", o2, he);
he = 0;
-
+ }
dive->cylinder[i].gasmix.o2.permille = o2;
dive->cylinder[i].gasmix.he.permille = he;