From 6bfb0371eb8dd7e3d18ff0225bebadf261de6b65 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 20 Jul 2011 03:33:06 -0700 Subject: Make sure some effect property values are finite --- OpenAL32/alEffect.c | 6 +++--- 1 file 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]; -- cgit v1.2.3