summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/deco.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/deco.c b/core/deco.c
index 108d4189e..78ab23f0a 100644
--- a/core/deco.c
+++ b/core/deco.c
@@ -540,6 +540,8 @@ void clear_vpmb_state(struct deco_state *ds) {
void clear_deco(struct deco_state *ds, double surface_pressure)
{
int ci;
+
+ memset(ds, 0, sizeof(*ds));
clear_vpmb_state(ds);
for (ci = 0; ci < 16; ci++) {
ds->tissue_n2_sat[ci] = (surface_pressure - ((in_planner() && (decoMode() == VPMB)) ? WV_PRESSURE_SCHREINER : WV_PRESSURE)) * N2_IN_AIR / 1000;