diff options
author | Dean Camera <[email protected]> | 2011-09-17 13:07:21 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2011-09-17 13:07:21 +0000 |
commit | 99ff27e4038b90eeed38c2a15ca8352152364d68 (patch) | |
tree | b60def0182a5166e148590e9552e92d7fe8c4fe7 /LUFA/Drivers/USB/Class/Common/HIDParser.c | |
parent | d881e0cbf691793ab6e5fe24f091549a007e009a (diff) | |
download | qmk_firmware-99ff27e4038b90eeed38c2a15ca8352152364d68.tar.gz qmk_firmware-99ff27e4038b90eeed38c2a15ca8352152364d68.zip |
Fixed HID Parser's largest report size bit count not including the size of the last parsed report item.
Fixed HID host driver's largest HID report size count corrupt when the number of report bits exceeds 255.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Common/HIDParser.c')
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/HIDParser.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index b601d8638a..903b039df5 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -255,8 +255,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, CurrReportIDInfo->ReportSizeBits[NewReportItem.ItemType] += CurrStateTable->Attributes.BitSize; - if (ParserData->LargestReportSizeBits < NewReportItem.BitOffset) - ParserData->LargestReportSizeBits = NewReportItem.BitOffset; + ParserData->LargestReportSizeBits = MAX(ParserData->LargestReportSizeBits, CurrReportIDInfo->ReportSizeBits[NewReportItem.ItemType]); if (ParserData->TotalReportItems == HID_MAX_REPORTITEMS) return HID_PARSE_InsufficientReportItems; |