Skip to content

Commit cb4437f

Browse files
authored
Update USBCore.cpp
1 parent e9d7e85 commit cb4437f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/USBCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ bool SendDescriptor(USBSetup& setup)
468468

469469
if (t == 0x21) {
470470
InitControl(setup.wLength);
471-
int toSend = setup.wLength < sizeof(hidClassDescriptor) ? setup.wLength : sizeof(hidClassDescriptor);
471+
int toSend = setup.wLength < hidClassDescriptorSize ? setup.wLength : hidClassDescriptorSize;
472472
USB_SendControl(TRANSFER_PGM, hidClassDescriptor, toSend);
473473
return true;
474474
}

0 commit comments

Comments
 (0)