device handle check fixed (check for 0 and not <0 as this may be a valid address)
git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@255 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -182,7 +182,7 @@ public class Device {
|
||||
|
||||
if (dev != null) {
|
||||
int res = LibusbJava.usb_open(dev);
|
||||
if (res <= 0) {
|
||||
if (res != 0) {
|
||||
throw new USBException("LibusbJava.usb_open: "
|
||||
+ LibusbJava.usb_strerror());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user