diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-02-01 21:27:43 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-02-01 14:43:27 -0800 |
commit | bb86d135468a23fbbc1976104af0a752a7d386b0 (patch) | |
tree | e181eacca7c34f45b24cb7ff7211c6e6d5a5640b | |
parent | 49cf4933df4ab5bd35518fda214b63aff6f36828 (diff) | |
download | subsurface-bb86d135468a23fbbc1976104af0a752a7d386b0.tar.gz |
Initialize the surface time
Otherwise we return garbage when there is no dive in the dive list.
Closes #184
Signed-off-by: Robert C. Helling <helling@atdotde.de>
-rw-r--r-- | core/divelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/divelist.c b/core/divelist.c index fdc1f906b..b28dd5ef3 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -364,7 +364,7 @@ static struct gasmix air = { .o2.permille = O2_IN_AIR, .he.permille = 0 }; unsigned int init_decompression(struct dive *dive) { int i, divenr = -1; - unsigned int surface_time; + unsigned int surface_time = 0; timestamp_t when, lasttime = 0, laststart = 0; bool deco_init = false; double surface_pressure; |