From 19829b6ceb7383f4642744225ef0cfc1e22c4d6d Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Fri, 30 Jan 2015 19:48:06 -0500 Subject: [PATCH] bad memory init --- src/visual/WaterfallCanvas.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/visual/WaterfallCanvas.cpp b/src/visual/WaterfallCanvas.cpp index 89394ae..ab5fb01 100644 --- a/src/visual/WaterfallCanvas.cpp +++ b/src/visual/WaterfallCanvas.cpp @@ -499,7 +499,7 @@ void WaterfallCanvas::setData(DemodulatorThreadIQData *input) { if (num_written >= fft_size) { execute = true; - memcpy(in, fft_in_data, sizeof(fftwf_complex) * fft_size * sizeof(fftwf_complex)); + memcpy(in, fft_in_data, fft_size * sizeof(fftwf_complex)); memcpy(fft_last_data, in, fft_size * sizeof(fftwf_complex)); } else { @@ -516,6 +516,7 @@ void WaterfallCanvas::setData(DemodulatorThreadIQData *input) { memcpy(in, fft_last_data + (last_data_size - num_last), num_last * sizeof(fftwf_complex)); memcpy(in + num_last, fft_in_data, num_written * sizeof(fftwf_complex)); memcpy(fft_last_data, in, fft_size * sizeof(fftwf_complex)); + execute = true; } }