From e83fae11bc5d229f7e7d0a268294d7225dd46229 Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 2 Jul 2023 16:16:51 +0200 Subject: [PATCH] same array size for in- and output in inverse fft function from fftw3 --- src/maths/cmaths/cmath4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/maths/cmaths/cmath4.c b/src/maths/cmaths/cmath4.c index fa2b7cb6f..0f9078950 100644 --- a/src/maths/cmaths/cmath4.c +++ b/src/maths/cmaths/cmath4.c @@ -933,7 +933,7 @@ cx_ifft(void *data, short int type, int length, int *newlength, short int *newty printf("IFFT: Frequency span: %g Hz, input length: %d\n", 1/span*length, length); printf("IFFT: Time resolution: %g s, output length: %d\n", span/(tpts-1), tpts); - in = fftw_malloc(sizeof(fftw_complex) * (unsigned int) length); + in = fftw_malloc(sizeof(fftw_complex) * (unsigned int) tpts); out = fftw_malloc(sizeof(fftw_complex) * (unsigned int) tpts); for (i = 0; i < length; i++) {