aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/hrtf.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-18 14:11:15 -0700
committerChris Robinson <[email protected]>2017-04-18 14:11:15 -0700
commit55011d4bfd46c920580d1aa6663bcfdb1e996d3e (patch)
tree67040a4f7e98acedc060930e146854f61dd8e71b /Alc/hrtf.c
parentde62ab97e912525f20272153f6a4c896e833839d (diff)
Use a different way to get the size of structs with flexible array members
Diffstat (limited to 'Alc/hrtf.c')
-rw-r--r--Alc/hrtf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 23817d66..3047915b 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -688,7 +688,7 @@ static void AddFileEntry(vector_EnumeratedHrtf *list, const_al_string filename)
TRACE("Got new file \"%s\"\n", alstr_get_cstr(filename));
loaded_entry = al_calloc(DEF_ALIGN,
- offsetof(struct HrtfEntry, filename[alstr_length(filename)+1])
+ FAM_SIZE(struct HrtfEntry, filename, alstr_length(filename)+1)
);
loaded_entry->next = LoadedHrtfs;
loaded_entry->handle = NULL;
@@ -769,7 +769,7 @@ static void AddBuiltInEntry(vector_EnumeratedHrtf *list, const_al_string filenam
TRACE("Got new file \"%s\"\n", alstr_get_cstr(filename));
loaded_entry = al_calloc(DEF_ALIGN,
- offsetof(struct HrtfEntry, filename[namelen])
+ FAM_SIZE(struct HrtfEntry, filename, namelen)
);
loaded_entry->next = LoadedHrtfs;
loaded_entry->handle = hrtf;