X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/995195a2b06142fb0882cf116a12bdab8e19603f..21a012a018221fd1e55b8b054d09d7900ed9fd79:/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 20fceab64..b90f89eb2 100644 --- a/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -351,7 +351,7 @@ uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData, uint16_t ReportSizeBits = ParserData->ReportIDSizes[i].ReportSizeBits[ReportType]; if (ParserData->ReportIDSizes[i].ReportID == ReportID) - return ((ReportSizeBits >> 3) + ((ReportSizeBits & 0x07) ? 1 : 0)); + return (ReportSizeBits / 8) + ((ReportSizeBits % 8) ? 1 : 0); } return 0;