summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2018-01-20 11:29:11 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2018-01-21 09:56:35 +0100
commite408e32ed6f76732548ba4203bd3aee96378de0e (patch)
treeb2cccf4883ac441450e5a02f7ecb83151111c5a3 /core
parentf2fe389abd8e9be648792e21365689c0265d556e (diff)
downloadsubsurface-e408e32ed6f76732548ba4203bd3aee96378de0e.tar.gz
Planner notes ICD: Print correct runtime for gaschange
If a gaschange happens at the beginning of a segment, currently the wrong runtime (end of segment time) is printed in the ICD table. This is corrected here. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core')
-rw-r--r--core/plannernotes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c
index 1c03d2048..cfe14c05e 100644
--- a/core/plannernotes.c
+++ b/core/plannernotes.c
@@ -337,7 +337,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
if (isobaric_counterdiffusion(&lastprintgasmix, &gasmix, &icdvalues)) // Do icd calculations
icdwarning = true;
strcpy(old_gas_name, gasname(&lastprintgasmix));
- icdlen += add_icd_entry(icdbuffer+icdlen, sz_icdbuf-icdlen, &icdvalues, dp->time, depth_to_mbar(dp->depth.mm, dive), old_gas_name, gasname(&gasmix)); // and print them to buffer.
+ icdlen += add_icd_entry(icdbuffer+icdlen, sz_icdbuf-icdlen, &icdvalues, lasttime, depth_to_mbar(dp->depth.mm, dive), old_gas_name, gasname(&gasmix)); // and print them to buffer.
}
}
// Set variables so subsequent iterations can test against the last gas printed