winmm: Handle invalid threshold values in joySetThreshold.

This commit is contained in:
Bruno Jesus 2014-12-11 02:54:01 -02:00 committed by Alexandre Julliard
parent 9c8978cf5c
commit 125b0f74c5
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ MMRESULT WINAPI joySetThreshold(UINT wID, UINT wThreshold)
{
TRACE("(%04X, %d);\n", wID, wThreshold);
if (wID >= MAXJOYSTICK) return MMSYSERR_INVALPARAM;
if (wID >= MAXJOYSTICK || wThreshold > 65535) return MMSYSERR_INVALPARAM;
JOY_Sticks[wID].threshold = wThreshold;