mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Limit recreational dives to 6 hours
Otherwise, with large gradient factors, one can have infinite NDL which result in an infinite loop when no gas is set. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
6d3c2327bd
commit
c6d626c618
1 changed files with 1 additions and 1 deletions
|
@ -782,7 +782,7 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
|
|||
clock += timestep;
|
||||
} while (trial_ascent(ds, 0, depth, 0, avg_depth, bottom_time, &dive->cylinder[current_cylinder].gasmix,
|
||||
po2, diveplan->surface_pressure / 1000.0, dive) &&
|
||||
enough_gas(current_cylinder));
|
||||
enough_gas(current_cylinder) && clock < 6 * 3600);
|
||||
|
||||
// We did stay one DECOTIMESTEP too many.
|
||||
// In the best of all worlds, we would roll back also the last add_segment in terms of caching deco state, but
|
||||
|
|
Loading…
Add table
Reference in a new issue