Fixed the issue in displaying lengthy string descriptor (more than 128 bytes)

Signed-off-by: Muthu M <[email protected]>
---
 usbmisc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usbmisc.c b/usbmisc.c
index f3577ea..71a702c 100644
--- a/usbmisc.c
+++ b/usbmisc.c
@@ -229,7 +229,7 @@ char *get_dev_string(libusb_device_handle *dev, u_int8_t id)
                                           sizeof unicode_buf);
        if (ret < 2) return strdup("(error)");
 
-       if (unicode_buf[0] < 2 || unicode_buf[1] != LIBUSB_DT_STRING)
+       if ((unsigned char)unicode_buf[0] < 2 || unicode_buf[1] != 
LIBUSB_DT_STRING)
                return strdup("(error)");
 
        buf = usb_string_to_native(unicode_buf + 2,
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to