aboutsummaryrefslogtreecommitdiffstats
path: root/common/pffft.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/pffft.cpp')
-rw-r--r--common/pffft.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/pffft.cpp b/common/pffft.cpp
index 71f71fa6..8e849cb4 100644
--- a/common/pffft.cpp
+++ b/common/pffft.cpp
@@ -1436,7 +1436,8 @@ PFFFT_Setup *pffft_new_setup(unsigned int N, pffft_transform_t transform)
assert((N%(SIMD_SZ*SIMD_SZ)) == 0);
const uint Ncvec = (transform == PFFFT_REAL ? N/2 : N)/SIMD_SZ;
- const size_t storelen{offsetof(PFFFT_Setup, e[0]) + (2u*Ncvec * sizeof(v4sf))};
+ const size_t storelen{std::max(sizeof(PFFFT_Setup),
+ offsetof(PFFFT_Setup, e[0]) + (2u*Ncvec * sizeof(v4sf)))};
void *store{al_calloc(MALLOC_V4SF_ALIGNMENT, storelen)};
if(!store) return nullptr;