summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r--libdivecomputer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c
index 9d4c1065a..4ff41486d 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -109,7 +109,7 @@ static int parse_gasmixes(struct dive *dive, parser_t *parser, int ngases)
he = gasmix.helium * 1000 + 0.5;
/* Ignore bogus data - libdivecomputer does some crazy stuff */
- if (o2 < 210 || o2 >= 1000)
+ if (o2 <= AIR_PERMILLE || o2 >= 1000)
o2 = 0;
if (he < 0 || he >= 800 || o2+he >= 1000)
he = 0;
@@ -175,7 +175,7 @@ sample_cb(parser_sample_type_t type, parser_sample_value_t value, void *userdata
case SAMPLE_TYPE_TIME:
sample = prepare_sample(divep);
sample->time.seconds = value.time;
- finish_sample(*divep, sample);
+ finish_sample(*divep);
break;
case SAMPLE_TYPE_DEPTH:
sample->depth.mm = value.depth * 1000 + 0.5;