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:
spandi
2007-08-15 17:46:33 +00:00
parent 27bedb75c4
commit 36e03ecbb8

View File

@@ -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());
}