Skip to content

Commit 0675b00

Browse files
committed
Fix typo in libusb code.
1 parent 75c15d1 commit 0675b00

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/usb-libusb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ get_serial_number(
11591159
goto fallback;
11601160

11611161
// Get the first supported language code...
1162-
if (libusb_get_string_descriptor(printer->device, 0, 0, langbuf, sizeof(langbuf)) < 4)
1162+
if (libusb_get_string_descriptor(printer->handle, 0, 0, langbuf, sizeof(langbuf)) < 4)
11631163
goto fallback; // Didn't get 4 bytes
11641164
else if (langbuf[0] < 4 || (langbuf[0] & 1))
11651165
goto fallback; // Bad length
@@ -1169,7 +1169,7 @@ get_serial_number(
11691169
langid = langbuf[2] | (langbuf[3] << 8);
11701170

11711171
// Then try to get the serial number string...
1172-
if ((snlen = libusb_get_string_descriptor(printer->device, desc_index, langid, snbuf, sizeof(snbuf))) < 10)
1172+
if ((snlen = libusb_get_string_descriptor(printer->handle, desc_index, langid, snbuf, sizeof(snbuf))) < 10)
11731173
goto fallback; // Didn't get at least 10 bytes
11741174
else if (snbuf[0] != snlen || (snbuf[0] & 1))
11751175
goto fallback; // Bad length

0 commit comments

Comments
 (0)