- The evaluation of the return value was not correct.

- There is still an issue with this kind of evaluation as there could be handles being 
  valid but have negative number. See Bug ID: 3515055 for details

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@288 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
uniederer
2012-04-05 11:26:31 +00:00
parent e8e83ded12
commit 82ec219081

View File

@@ -120,7 +120,7 @@ public class TestLibUsbJava {
udev = LibusbJava.usb_open(dev); udev = LibusbJava.usb_open(dev);
if (udev != 0) { if (udev <= 0) {
if (dev.getDescriptor().getIManufacturer() != 0) { if (dev.getDescriptor().getIManufacturer() != 0) {
mfr = LibusbJava.usb_get_string_simple(udev, dev mfr = LibusbJava.usb_get_string_simple(udev, dev
.getDescriptor().getIManufacturer()); .getDescriptor().getIManufacturer());