diff options
author | Chris Robinson <[email protected]> | 2017-04-18 14:11:15 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-18 14:11:15 -0700 |
commit | 55011d4bfd46c920580d1aa6663bcfdb1e996d3e (patch) | |
tree | 67040a4f7e98acedc060930e146854f61dd8e71b /Alc/converter.c | |
parent | de62ab97e912525f20272153f6a4c896e833839d (diff) |
Use a different way to get the size of structs with flexible array members
Diffstat (limited to 'Alc/converter.c')
-rw-r--r-- | Alc/converter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/converter.c b/Alc/converter.c index 99069d15..f1a3a96b 100644 --- a/Alc/converter.c +++ b/Alc/converter.c @@ -13,7 +13,7 @@ SampleConverter *CreateSampleConverter(enum DevFmtType srcType, enum DevFmtType if(numchans <= 0 || srcRate <= 0 || dstRate <= 0) return NULL; - converter = al_calloc(16, offsetof(SampleConverter, Chan[numchans])); + converter = al_calloc(16, FAM_SIZE(SampleConverter, Chan, numchans)); converter->mSrcType = srcType; converter->mDstType = dstType; converter->mNumChannels = numchans; |