diff options
author | Chris Robinson <[email protected]> | 2017-04-05 12:46:02 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-05 12:46:02 -0700 |
commit | 37f666fbabad7db69a0604e4d38181d79c0dbc05 (patch) | |
tree | 0841a0be567e90d20041c4666eed7584a3d8e009 /Alc | |
parent | 2eaa10fc213dd60b197129da17b431b3d7e9f1d5 (diff) |
Fix an incorrect message
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/hrtf.c | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -633,21 +633,24 @@ static void AddFileEntry(vector_EnumeratedHrtf *list, const_al_string filename) } #undef MATCH_FNAME - TRACE("Skipping load of already-loaded file %s\n", alstr_get_cstr(filename)); - goto skip_load; + break; } loaded_entry = loaded_entry->next; } - loaded_entry = al_calloc(DEF_ALIGN, - offsetof(struct HrtfEntry, filename[alstr_length(filename)+1]) - ); - loaded_entry->next = LoadedHrtfs; - loaded_entry->handle = NULL; - strcpy(loaded_entry->filename, alstr_get_cstr(filename)); - LoadedHrtfs = loaded_entry; + if(!loaded_entry) + { + TRACE("Got new file \"%s\"\n", alstr_get_cstr(filename)); + + loaded_entry = al_calloc(DEF_ALIGN, + offsetof(struct HrtfEntry, filename[alstr_length(filename)+1]) + ); + loaded_entry->next = LoadedHrtfs; + loaded_entry->handle = NULL; + strcpy(loaded_entry->filename, alstr_get_cstr(filename)); + LoadedHrtfs = loaded_entry; + } -skip_load: /* TODO: Get a human-readable name from the HRTF data (possibly coming in a * format update). */ name = strrchr(alstr_get_cstr(filename), '/'); |