Windows: Be a bit smarter when setting composite interfaces
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 4 Jan 2018 23:45:07 +0000 (15:45 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Thu, 4 Jan 2018 23:45:07 +0000 (15:45 -0800)
commitdef374393b0ca0ccb82a851f2930a3767f8d78f0
tree409052e814764d538e7dd984d939ad818fc4ae28
parentbb0a3e8c015b03a6262d4122a1d39f6c58261d98
Windows: Be a bit smarter when setting composite interfaces

Instead of open-coding the search for the "MI_" substring, use the
strstr() function to find the string and verify that the following two
characters are indeed digits.

Also guard against the possibility of the interface number being larger
than what we can support.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/windows_winusb.c
libusb/version_nano.h