commit | 4b64243c3727ce6f5d170b405aecc63f8460af32 | [log] [tgz] |
---|---|---|
author | Sam Lantinga <slouken@libsdl.org> | Sat Nov 21 09:06:48 2020 -0800 |
committer | Sam Lantinga <slouken@libsdl.org> | Sat Nov 21 09:06:48 2020 -0800 |
tree | 68db6513393326f78661ff5c8f3d01232e17087b | |
parent | 06b2f395ba29d7d1c0f7d7279810bc0ddcf31f98 [diff] |
Fixed upstream bug: FD 0 is a valid file descriptor https://github.com/libusb/hidapi/issues/199
diff --git a/src/hidapi/linux/hid.c b/src/hidapi/linux/hid.c index 4ea77b5..6a94334 100644 --- a/src/hidapi/linux/hid.c +++ b/src/hidapi/linux/hid.c
@@ -719,7 +719,7 @@ dev->device_handle = open(path, O_RDWR); /* If we have a good handle, return it. */ - if (dev->device_handle > 0) { + if (dev->device_handle >= 0) { /* Get the report descriptor */ int res, desc_size = 0;