mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix plot_info calculate_max_limits_new() function return value
The return value(structure) was not fully initialized, thus random data returned for uninitialized members possibly causing random bahavior. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0e3852e625
commit
3e41047d41
1 changed files with 1 additions and 0 deletions
|
@ -770,6 +770,7 @@ struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer
|
|||
if (minpressure > maxpressure)
|
||||
minpressure = 0;
|
||||
|
||||
memset(&pi, 0, sizeof(pi));
|
||||
pi.maxdepth = maxdepth;
|
||||
pi.maxtime = maxtime;
|
||||
pi.maxpressure = maxpressure;
|
||||
|
|
Loading…
Add table
Reference in a new issue