Allow zero length segments in planner

Those are needed to indicate bailout or set point switches
at the beginning of  the ascend.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2018-08-08 16:09:44 +02:00 committed by Dirk Hohndel
parent 607012cccb
commit b9fcc9543d

View file

@ -410,7 +410,7 @@ void add_to_end_of_diveplan(struct diveplan *diveplan, struct divedatapoint *dp)
lastdp = &(*lastdp)->next;
}
*lastdp = dp;
if (ldp && dp->time != 0)
if (ldp)
dp->time += lasttime;
}