diff --git a/examples/HID/SRWS1/SRWS1.cpp b/examples/HID/SRWS1/SRWS1.cpp index 97e53a73..77396f84 100644 --- a/examples/HID/SRWS1/SRWS1.cpp +++ b/examples/HID/SRWS1/SRWS1.cpp @@ -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