winmm: Respect return value from joyGetPos (Coverity)
Andrew Eikum
aeikum at codeweavers.com
Tue Dec 22 13:05:10 CST 2015
This section is already consistently using 8-space tabs, I'd rather
not break that. Also I think you should print a WARN when joyGetPos
returns an error.
Andrew
On Tue, Dec 22, 2015 at 07:34:59PM +0100, André Hentschel wrote:
> Signed-off-by: André Hentschel <nerv at dawncrow.de>
> ---
> CID 1261597
>
> dlls/winmm/joystick.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c
> index 6ac67f4..fb30ac8 100644
> --- a/dlls/winmm/joystick.c
> +++ b/dlls/winmm/joystick.c
> @@ -93,7 +93,8 @@ static void CALLBACK JOY_Timer(HWND hWnd, UINT wMsg, UINT_PTR wTimer, DWORD dwTi
>
> if (joy->hCapture != hWnd) continue;
>
> - joyGetPos(i, &ji);
> + if (joyGetPos(i, &ji) != JOYERR_NOERROR) continue;
> +
> pos = MAKELONG(ji.wXpos, ji.wYpos);
>
> if (!joy->bChanged ||
> --
> 1.9.1
>
>
>
>
More information about the wine-devel
mailing list