diff options
author | Boris Barbulovski <bbarbulovski@gmail.com> | 2014-02-10 15:50:45 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-10 07:54:17 -0800 |
commit | 3e41047d41388002039f8863b35de3b9bfc30888 (patch) | |
tree | ec07116efc1f13bd739fce7380e89849665ff97e /profile.c | |
parent | 0e3852e62567e9ae2073889821baf5b651bdf228 (diff) | |
download | subsurface-3e41047d41388002039f8863b35de3b9bfc30888.tar.gz |
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>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 1 |
1 files changed, 1 insertions, 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; |