projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed HID Parser's largest report size bit count not including the size of the last...
[pub/USBasp.git]
/
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
b601d86
..
903b039
100644
(file)
--- 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;
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;
if (ParserData->TotalReportItems == HID_MAX_REPORTITEMS)
return HID_PARSE_InsufficientReportItems;