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/hrtf.c | |
parent | de62ab97e912525f20272153f6a4c896e833839d (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |