Hi:

I ran into a situation with libhid where a USB product ID of 0x0501 was matching on a USB device with a product ID of 0x0503. I narrowed it down in hid_compare_usb_device() to the line below:
-----
((dev->descriptor.idProduct & match->product_id) == match->product_id)
-----

Tracing the values of the above, both match and dev descriptor, the values were showing correct (0x0501, 0x0503), but still evaluating as matched.

If I change the above code to just:
-----
(dev->descriptor.idProduct == match->product_id)
-----

Then the product ID's match correctly, and only 0x0501 matches 0x0501. Any ideas on why 0x0503 would match 0x0501 on the original code?

Actual hex codes were set/used in the passed HIDInterfaceMatcher struct.

As a side note, the vendor ID did not experience this problem. Latest SVN trunk (2015-04-19).

Thanks.


~ Chris

_______________________________________________
libhid-discuss mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/libhid-discuss
http://libhid.alioth.debian.org/

Reply via email to