From 057f048d1ba5a598d8c20140a912b2e9fadf8c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sun, 23 Jul 2017 17:51:52 +0200 Subject: [PATCH] Fix pointer arithmetic. --- right/src/usb_protocol_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index 1235351..9e40520 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -106,7 +106,7 @@ void launchEepromTransfer(void) void readConfiguration(bool isHardware) { uint8_t length = GenericHidInBuffer[1]; - uint16_t offset = *((uint16_t*)GenericHidInBuffer+2); + uint16_t offset = *((uint16_t*)(GenericHidInBuffer+2)); if (length > USB_GENERIC_HID_OUT_BUFFER_LENGTH-1) { setError(ConfigTransferResponse_LengthTooLarge);