From 55011d4bfd46c920580d1aa6663bcfdb1e996d3e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 18 Apr 2017 14:11:15 -0700 Subject: Use a different way to get the size of structs with flexible array members --- OpenAL32/alSource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenAL32/alSource.c') diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 236188cf..9fc22205 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -3013,7 +3013,7 @@ static void UpdateSourceProps(ALsource *source, ALvoice *voice, ALsizei num_send /* Get an unused property container, or allocate a new one as needed. */ props = ATOMIC_LOAD(&voice->FreeList, almemory_order_acquire); if(!props) - props = al_calloc(16, offsetof(struct ALvoiceProps, Send[num_sends])); + props = al_calloc(16, FAM_SIZE(struct ALvoiceProps, Send, num_sends)); else { struct ALvoiceProps *next; -- cgit v1.2.3