From d5ddc6acee1e3092ecda49b09be997916db5a988 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 21 Jul 2011 16:18:21 -0700 Subject: Make sure some state values are finite --- OpenAL32/alState.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenAL32/alState.c') diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c index 3c1ab9b8..0e0e5d4b 100644 --- a/OpenAL32/alState.c +++ b/OpenAL32/alState.c @@ -496,7 +496,7 @@ AL_API ALvoid AL_APIENTRY alDopplerFactor(ALfloat value) Context = GetLockedContext(); if(!Context) return; - if(value >= 0.0f) + if(value >= 0.0f && isfinite(value)) { Context->DopplerFactor = value; Context->UpdateSources = AL_TRUE; @@ -514,7 +514,7 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value) Context = GetLockedContext(); if(!Context) return; - if(value > 0.0f) + if(value > 0.0f && isfinite(value)) { Context->DopplerVelocity=value; Context->UpdateSources = AL_TRUE; @@ -532,7 +532,7 @@ AL_API ALvoid AL_APIENTRY alSpeedOfSound(ALfloat flSpeedOfSound) pContext = GetLockedContext(); if(!pContext) return; - if(flSpeedOfSound > 0.0f) + if(flSpeedOfSound > 0.0f && isfinite(flSpeedOfSound)) { pContext->flSpeedOfSound = flSpeedOfSound; pContext->UpdateSources = AL_TRUE; -- cgit v1.2.3