summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-02 13:14:59 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-02 13:14:59 -0700
commitdb4a003ef52baeee8f7d56e56f8314cf61ec4b64 (patch)
tree7560bc8a850d5ebd0000985327356a3baa9dcde7
parent9cae50acab13c027cd7c80811b0f3a637d54f32f (diff)
downloadsubsurface-db4a003ef52baeee8f7d56e56f8314cf61ec4b64.tar.gz
Planner: fix typo that broke tank pressure tracking
Oops, that's embarrassing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--planner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/planner.c b/planner.c
index dbe59730c..70295dd73 100644
--- a/planner.c
+++ b/planner.c
@@ -226,7 +226,7 @@ static void update_cylinder_pressure(struct dive *d, int old_depth, int new_dept
mean_depth.mm = (old_depth + new_depth) / 2;
gas_used.mliter = depth_to_atm(mean_depth.mm, d) * sac / 60 * duration;
cyl->gas_used.mliter += gas_used.mliter;
- if (!cyl->type.size.mliter) {
+ if (cyl->type.size.mliter) {
delta_p.mbar = gas_used.mliter * 1000.0 / cyl->type.size.mliter;
cyl->end.mbar -= delta_p.mbar;
}