X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/4b229cb5efbf80295432a52973b5708f54cba748..e9029d49d5455ec146d2e87436d43d747d6c657a:/LUFA/Drivers/USB/Class/Common/HIDParser.c diff --git a/LUFA/Drivers/USB/Class/Common/HIDParser.c b/LUFA/Drivers/USB/Class/Common/HIDParser.c index b601d8638..903b039df 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;