HID Report ID is unsigned value, so clear the rest of bits from possible

sign expansion.
This commit is contained in:
Alexander Motin 2012-05-16 17:51:56 +00:00
parent 553c9b4d08
commit cff79d9ed3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235510
2 changed files with 2 additions and 2 deletions

View file

@ -392,7 +392,7 @@ hid_get_item(hid_data_t s, hid_item_t *h)
s->loc_size = dval & mask;
break;
case 8:
hid_switch_rid(s, c, dval);
hid_switch_rid(s, c, dval & mask);
break;
case 9:
/* mask because value is unsigned */

View file

@ -425,7 +425,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
s->loc_size = dval & mask;
break;
case 8:
hid_switch_rid(s, c, dval);
hid_switch_rid(s, c, dval & mask);
break;
case 9:
/* mask because value is unsigned */