mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Zero initialize deco state struct
Valgrind found use of some uninitialized variable (probably ds->gf_low_pressure_this_dive ), see #1614. Zero is the correct value to start with. Lacking a working version of valgrind I cannot check this actually fixes the problem. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
4e1f806d02
commit
554a7aaba4
1 changed files with 1 additions and 0 deletions
|
@ -903,6 +903,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
|
|||
struct deco_state plan_deco_state;
|
||||
struct diveplan *plan_copy;
|
||||
|
||||
memset(&plan_deco_state, 0, sizeof(struct deco_state));
|
||||
plan(&plan_deco_state, &diveplan, &displayed_dive, DECOTIMESTEP, stoptable, &cache, isPlanner(), false);
|
||||
plan_copy = (struct diveplan *)malloc(sizeof(struct diveplan));
|
||||
lock_planner();
|
||||
|
|
Loading…
Reference in a new issue