winmm: Handle invalid threshold values in joySetThreshold.
This commit is contained in:
parent
9c8978cf5c
commit
125b0f74c5
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue