From 2a3fe667274a42c897fc383e6e3546253058370c Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Sun, 14 Jan 2018 16:59:53 +0100 Subject: [PATCH] Cast return type of sizeof in the SRWS1 example as well --- examples/HID/SRWS1/SRWS1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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