diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-18 09:33:24 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-18 09:33:24 +0200 |
commit | 55de6ead40cd7120cfd798715cbfc57eb05b417d (patch) | |
tree | a9eaa74a7f36a2cb45d325cec3a745757d828989 /opentrack/tracker.cpp | |
parent | c89a1d04630cf7e334fa36b01c9240f0bc0b82c6 (diff) |
tracker: initialize newpose
In
newpose[i] = elide_nan(tmp[i], newpose[i]);
uninitialized memory can be used.
Diffstat (limited to 'opentrack/tracker.cpp')
-rw-r--r-- | opentrack/tracker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp index ad10e396..6411db40 100644 --- a/opentrack/tracker.cpp +++ b/opentrack/tracker.cpp @@ -24,6 +24,7 @@ Tracker::Tracker(main_settings& s, Mappings &m, SelectedLibraries &libs) : s(s), m(m), + newpose {0,0,0, 0,0,0}, centerp(s.center_at_startup), enabledp(true), zero_(false), @@ -254,7 +255,7 @@ void Tracker::run() { double tmp[6] {0,0,0, 0,0,0}; libs.pTracker->data(tmp); - + if (enabledp) for (int i = 0; i < 6; i++) newpose[i] = elide_nan(tmp[i], newpose[i]); |