In usbhid_open(), correctly calculate the
offset for serial number matching. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1389 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
185b615245
commit
71be95b16a
|
@ -1,3 +1,8 @@
|
||||||
|
2016-04-18 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
* usb_hidapi.c (usbhid_open): Correctly calculate the
|
||||||
|
offset for serial number matching
|
||||||
|
|
||||||
2016-03-28 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2016-03-28 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
bug #47550: Linux GPIO broken
|
bug #47550: Linux GPIO broken
|
||||||
|
|
|
@ -108,7 +108,9 @@ static int usbhid_open(char * port, union pinfo pinfo, union filedescriptor *fd)
|
||||||
{
|
{
|
||||||
avrdude_message(MSG_NOTICE, "%s: usbhid_open(): Found %ls, serno: %ls\n",
|
avrdude_message(MSG_NOTICE, "%s: usbhid_open(): Found %ls, serno: %ls\n",
|
||||||
progname, walk->product_string, walk->serial_number);
|
progname, walk->product_string, walk->serial_number);
|
||||||
if (wcscmp(walk->serial_number + serlen, wserno) == 0)
|
size_t slen = wcslen(walk->serial_number);
|
||||||
|
if (slen >= serlen &&
|
||||||
|
wcscmp(walk->serial_number + slen - serlen, wserno) == 0)
|
||||||
{
|
{
|
||||||
/* found matching serial number */
|
/* found matching serial number */
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue