summaryrefslogtreecommitdiffstats
path: root/core/device.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-05-07 11:14:57 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-07 13:11:53 +0300
commitfc7cb09b37fc3e39fe7d60f1af83f506b7bfcbd2 (patch)
tree441d47cf7be6858299896db41ac759d066fb4f80 /core/device.c
parent920ff15f7160cfa6ed8d8d81e0c156dd1d7b27c6 (diff)
downloadsubsurface-fc7cb09b37fc3e39fe7d60f1af83f506b7bfcbd2.tar.gz
Planner: Correctly fill out last_manual_time in fake_dc()
By not filling out this value, entering of manual dives was broken for dive lengths starting with a digit 5 or higher. Fixes #1211 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/device.c')
-rw-r--r--core/device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/device.c b/core/device.c
index c9036304a..57f7576e1 100644
--- a/core/device.c
+++ b/core/device.c
@@ -133,6 +133,9 @@ void fake_dc(struct divecomputer *dc)
return;
}
+ /* Set last manually entered time to the total dive length */
+ dc->last_manual_time = dc->duration;
+
/*
* We want to fake the profile so that the average
* depth ends up correct. However, in the absence of