aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/hrtf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 92a1acea..34070792 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -1051,16 +1051,16 @@ vector_HrtfEntry EnumerateHrtf(const_al_string devname)
/* Find the preferred HRTF and move it to the front of the list. */
#define FIND_ENTRY(i) (al_string_cmp_cstr((i)->name, defaulthrtf) == 0)
VECTOR_FIND_IF(iter, const HrtfEntry, list, FIND_ENTRY);
- if(iter != VECTOR_END(list) && iter != VECTOR_BEGIN(list))
+#undef FIND_ENTRY
+ if(iter == VECTOR_END(list))
+ WARN("Failed to find default HRTF \"%s\"\n", defaulthrtf);
+ else if(iter != VECTOR_BEGIN(list))
{
HrtfEntry entry = *iter;
memmove(&VECTOR_ELEM(list,1), &VECTOR_ELEM(list,0),
(iter-VECTOR_BEGIN(list))*sizeof(HrtfEntry));
VECTOR_ELEM(list,0) = entry;
}
- else
- WARN("Failed to find default HRTF \"%s\"\n", defaulthrtf);
-#undef FIND_ENTRY
}
return list;