Changeset dd19446 in mainline


Ignore:
Timestamp:
2024-03-07T08:09:52Z (7 weeks ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
7dbf1f6
Parents:
2cdf520
git-author:
Jiri Svoboda <jiri@…> (2024-03-06 19:09:30)
git-committer:
Jiri Svoboda <jiri@…> (2024-03-07 08:09:52)
Message:

Fix bug in usb_hid_translate_data()

Fixes Lenovo wireless mouse

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhid/src/hidparser.c

    r2cdf520 rdd19446  
    225225        /* Than we take the higher bits from the LSB */
    226226        const unsigned bit_offset = item->offset % 8;
    227         const int lsb_bits = min(bits, 8);
     227        const int lsb_bits = min((unsigned)bits, 8 - bit_offset);
    228228
    229229        value |= (*data >> bit_offset) & BIT_RRANGE(uint8_t, lsb_bits);
Note: See TracChangeset for help on using the changeset viewer.