From 355b8db9152b9b4c88d3d01c79e0fdc21a2d623f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 3 Jan 2014 23:19:14 -0800 Subject: Don't allow min key/vel ranges to exceed max range --- OpenAL32/alFontsound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenAL32/alFontsound.c') 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; -- cgit v1.2.3