- Bugfix: LibusbJava.cpp, Ln 1288 removed the manipulation of the return value
- Bugfix: Guaranteeing '\0'-Termination of the retrieved C-Strings for all libusb_get_string_descriptor* calls - Change: The whole interface makes now use of exceptions to pass errors into the java environment instead encoding them into return values. - Change: Allowing Descriptor strings to have a length of 0 git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@292 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -223,9 +223,9 @@ public class Device {
|
||||
|
||||
if (dev != null) {
|
||||
long res = LibusbJava.usb_open(dev);
|
||||
if (res <= 0) {
|
||||
if (res == 0) {
|
||||
throw new USBException("LibusbJava.usb_open: "
|
||||
+ LibusbJava.usb_strerror() + " (" + res + ")");
|
||||
+ LibusbJava.usb_strerror());
|
||||
}
|
||||
usbDevHandle = res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user