diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-09-17 13:07:21 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-09-17 13:07:21 +0000 |
| commit | 19ba683f9163cbbffdcf714e18043a2725110a8e (patch) | |
| tree | b60def0182a5166e148590e9552e92d7fe8c4fe7 /LUFA/Drivers/USB/Class/Common/HIDParser.c | |
| parent | 166ac8b316805b117bc0b492797889c277a1f278 (diff) | |
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1924 d5102386-fcda-11dd-9fdb-3debd5008f28
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 b601d863..903b039d 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; |
