Cast return type of sizeof in the SRWS1 example as well

This commit is contained in:
Kristian Sloth Lauszus 2018-01-14 16:59:53 +01:00
parent a017f0f311
commit 2a3fe66727

View file

@ -29,7 +29,7 @@ void SRWS1::ParseHIDData(USBHID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
}
}
#endif
memcpy(&srws1Data, buf, min(len, sizeof(srws1Data)));
memcpy(&srws1Data, buf, min(len, MFK_CASTUINT8T sizeof(srws1Data)));
static SRWS1DataButtons oldButtonState;
if (srws1Data.btn.val != oldButtonState.val) { // Check if anything has changed