Skip to content

Commit ba1ad40

Browse files
committed
Add cast for string passed into strlen
1 parent ea894b1 commit ba1ad40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/USB/USBCore.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ bool USBDeviceClass::sendStringDescriptor(const uint8_t *string, uint8_t maxlen)
9292

9393
uint8_t buffer[maxlen];
9494
buffer[0] = 0x03;
95-
buffer[1] = strlen(string) * 2 + 2;
95+
buffer[1] = strlen((const char*)string) * 2 + 2;
9696

9797
uint8_t i;
9898
for (i = 2; i < maxlen && *string; i++) {

0 commit comments

Comments
 (0)