Commit 125b0f74 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

winmm: Handle invalid threshold values in joySetThreshold.

parent 9c8978cf
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment