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>
This commit is contained in:
Robert C. Helling 2017-02-01 21:27:43 +01:00 committed by Dirk Hohndel
parent 49cf4933df
commit bb86d13546

View file

@ -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;