From bb86d135468a23fbbc1976104af0a752a7d386b0 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Wed, 1 Feb 2017 21:27:43 +0100 Subject: 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 --- core/divelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/divelist.c') 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; -- cgit v1.2.3-70-g09d2