aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-20 03:33:06 -0700
committerChris Robinson <[email protected]>2011-07-20 03:33:06 -0700
commit6bfb0371eb8dd7e3d18ff0225bebadf261de6b65 (patch)
tree38528ca250b2fe19e258b40d888dc41f90edae62 /OpenAL32
parent1348bf24769be43642ab0f0cf9533395c1167b3f (diff)
Make sure some effect property values are finite
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alEffect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index 8c3a151f..ecaa691e 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -633,7 +633,7 @@ AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue
switch(param)
{
case AL_DEDICATED_GAIN:
- if(flValue >= 0.0f)
+ if(flValue >= 0.0f && isfinite(flValue))
ALEffect->Params.Dedicated.Gain = flValue;
else
alSetError(Context, AL_INVALID_VALUE);
@@ -670,7 +670,7 @@ AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflVa
switch(param)
{
case AL_EAXREVERB_REFLECTIONS_PAN:
- if(!isnan(pflValues[0]) && !isnan(pflValues[1]) && !isnan(pflValues[2]))
+ if(isfinite(pflValues[0]) && isfinite(pflValues[1]) && isfinite(pflValues[2]))
{
ALEffect->Params.Reverb.ReflectionsPan[0] = pflValues[0];
ALEffect->Params.Reverb.ReflectionsPan[1] = pflValues[1];
@@ -680,7 +680,7 @@ AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflVa
alSetError(Context, AL_INVALID_VALUE);
break;
case AL_EAXREVERB_LATE_REVERB_PAN:
- if(!isnan(pflValues[0]) && !isnan(pflValues[1]) && !isnan(pflValues[2]))
+ if(isfinite(pflValues[0]) && isfinite(pflValues[1]) && isfinite(pflValues[2]))
{
ALEffect->Params.Reverb.LateReverbPan[0] = pflValues[0];
ALEffect->Params.Reverb.LateReverbPan[1] = pflValues[1];