summaryrefslogtreecommitdiffstats
path: root/statistics.c
diff options
context:
space:
mode:
Diffstat (limited to 'statistics.c')
-rw-r--r--statistics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/statistics.c b/statistics.c
index 1610a1a8a..ad5a95d06 100644
--- a/statistics.c
+++ b/statistics.c
@@ -329,7 +329,7 @@ void get_gas_used(struct dive *dive, volume_t gases[MAX_CYLINDERS])
start = cyl->start.mbar ? cyl->start : cyl->sample_start;
end = cyl->end.mbar ? cyl->end : cyl->sample_end;
- if (start.mbar && end.mbar)
+ if (end.mbar && start.mbar > end.mbar)
gases[idx].mliter = gas_volume(cyl, start) - gas_volume(cyl, end);
}
}