aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-01-03 23:19:14 -0800
committerChris Robinson <[email protected]>2014-01-03 23:19:14 -0800
commit355b8db9152b9b4c88d3d01c79e0fdc21a2d623f (patch)
tree1a536278a4e7d92e7795c8f53211433c483f682b /OpenAL32
parent13066bbf87c871d848df22c660b17db435561618 (diff)
Don't allow min key/vel ranges to exceed max range
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alFontsound.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c
index 540f726b..3c47822c 100644
--- a/OpenAL32/alFontsound.c
+++ b/OpenAL32/alFontsound.c
@@ -138,14 +138,14 @@ AL_API void AL_APIENTRY alFontsound2iSOFT(ALuint id, ALenum param, ALint value1,
switch(param)
{
case AL_KEY_RANGE_SOFT:
- if(!(value1 >= 0 && value1 <= 127 && value2 >= 0 && value2 <= 127))
+ if(!(value1 >= 0 && value1 <= 127 && value2 >= 0 && value2 <= 127 && value2 >= value1))
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
sound->MinKey = value1;
sound->MaxKey = value2;
break;
case AL_VELOCITY_RANGE_SOFT:
- if(!(value1 >= 0 && value1 <= 127 && value2 >= 0 && value2 <= 127))
+ if(!(value1 >= 0 && value1 <= 127 && value2 >= 0 && value2 <= 127 && value2 >= value1))
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
sound->MinVelocity = value1;
sound->MaxVelocity = value2;