Reading joystick 5 when we only support 4 should fail instead of

hang.
This commit is contained in:
Ove Kaaven 1999-01-03 12:28:03 +00:00 committed by Alexandre Julliard
parent d4fb05707a
commit ed80878377
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ BOOL16 joyOpenDriver(WORD wID)
char dev_name[] = "/dev/js%d";
char buf[20];
if (wID>3) return FALSE;
if (joy_dev[wID] >= 0) return TRUE;
sprintf(buf,dev_name,wID);
if ((joy_dev[wID] = open(buf, O_RDONLY)) >= 0) {