winejoystick.drv: Fix file descriptor leak.

This commit is contained in:
Vincent Pelletier 2009-01-17 12:31:39 +01:00 committed by Alexandre Julliard
parent 3d97055be7
commit 279690e3e7
1 changed files with 2 additions and 1 deletions

View File

@ -178,8 +178,9 @@ static int JSTCK_OpenDevice(WINE_JSTCK* jstick)
#endif
if ((jstick->dev = open(buf, flags)) < 0) {
sprintf(buf, JOYDEV_OLD, jstick->joyIntf);
jstick->dev = open(buf, flags);
}
return (jstick->dev = open(buf, flags));
return jstick->dev;
}