diff options
author | Franz Zotter <fzotter@users.sourceforge.net> | 2008-07-22 17:23:43 +0000 |
---|---|---|
committer | Franz Zotter <fzotter@users.sourceforge.net> | 2008-07-22 17:23:43 +0000 |
commit | 95e71c35ba7c54f9c6cd248714195cefe17c77cb (patch) | |
tree | 730523c2020d84987f7762e31245fed4d378a8e1 /src/mtx_rfft.c | |
parent | ccb1a5cf6a0db766ef85e59f40a8431fb15b8acc (diff) |
corrected [mtx_rfft] and [mtx_rifft] memory bugs.
svn path=/trunk/externals/iem/iemmatrix/; revision=10208
Diffstat (limited to 'src/mtx_rfft.c')
-rw-r--r-- | src/mtx_rfft.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mtx_rfft.c b/src/mtx_rfft.c index d0890c3..2d9d18f 100644 --- a/src/mtx_rfft.c +++ b/src/mtx_rfft.c @@ -137,10 +137,13 @@ static void readFloatFromList (int n, t_atom *l, t_float *f) } #ifdef HAVE_FFTW3_H -static void writeFFTWComplexPartIntoList (int n, t_atom *l, fftw_complex *f, enum ComplexPart p) +static void writeFFTWComplexPartIntoList (int n, t_atom *l, fftw_complex *c, enum ComplexPart p) { - for (;n--;f++, l++) - SETFLOAT (l, ((t_float)*f[p])); + t_float f; + while (n--) { + f=(t_float)c[n][p]; + SETFLOAT (l+n, f); + } } static void readDoubleFromList (int n, t_atom *l, double *f) { |