diff --git a/cores/nRF5/Adafruit_TinyUSB_Core/Adafruit_USBD_Device.cpp b/cores/nRF5/Adafruit_TinyUSB_Core/Adafruit_USBD_Device.cpp index b1b9cbe6..6910ba50 100644 --- a/cores/nRF5/Adafruit_TinyUSB_Core/Adafruit_USBD_Device.cpp +++ b/cores/nRF5/Adafruit_TinyUSB_Core/Adafruit_USBD_Device.cpp @@ -164,7 +164,8 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index) return USBDevice._desc_cfg; } -static uint16_t _desc_str[32]; +// up to 32 unicode characters (header make it 33) +static uint16_t _desc_str[33]; // Invoked when received GET STRING DESCRIPTOR request // Application return pointer to descriptor, whose contents must exist long enough for transfer to complete @@ -187,7 +188,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index) // cap at max char chr_count = strlen(str); - if ( chr_count > 31 ) chr_count = 31; + if ( chr_count > 32 ) chr_count = 32; for(uint8_t i=0; i