aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alEffect.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r--OpenAL32/alEffect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index ff7195aa..749c7798 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -1347,8 +1347,9 @@ static const struct {
DECL(DRUGGED),
DECL(DIZZY),
DECL(PSYCHOTIC),
- { "", EFX_REVERB_PRESET_GENERIC }
};
+#undef DECL
+static const ALsizei reverblistsize = sizeof(reverblist)/sizeof(reverblist[0]);
ALvoid GetReverbEffect(const char *name, ALeffect *effect)
{
@@ -1360,7 +1361,7 @@ ALvoid GetReverbEffect(const char *name, ALeffect *effect)
InitEffectParams(effect, AL_EFFECT_REVERB);
else
InitEffectParams(effect, AL_EFFECT_NULL);
- for(i = 0;reverblist[i].name[0];i++)
+ for(i = 0;i < reverblistsize;i++)
{
const EFXEAXREVERBPROPERTIES *props;
@@ -1398,6 +1399,6 @@ ALvoid GetReverbEffect(const char *name, ALeffect *effect)
effect->Reverb.DecayHFLimit = props->iDecayHFLimit;
break;
}
- if(!reverblist[i].name[0])
+ if(i == reverblistsize)
WARN("Reverb preset '%s' not found\n", name);
}