HID Report ID is unsigned value, so clear the rest of bits from possible
sign expansion.
This commit is contained in:
parent
553c9b4d08
commit
cff79d9ed3
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user