Skip to content

Commit e38c37b

Browse files
committed
clean up
1 parent 1529ed0 commit e38c37b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cores/nRF5/Adafruit_TinyUSB_Core/Adafruit_USBD_Device.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index)
164164
return USBDevice._desc_cfg;
165165
}
166166

167-
static uint16_t _desc_str[32];
167+
// up to 32 unicode characters (header make it 33)
168+
static uint16_t _desc_str[33];
168169

169170
// Invoked when received GET STRING DESCRIPTOR request
170171
// 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)
187188

188189
// cap at max char
189190
chr_count = strlen(str);
190-
if ( chr_count > 31 ) chr_count = 31;
191+
if ( chr_count > 32 ) chr_count = 32;
191192

192193
for(uint8_t i=0; i<chr_count; i++)
193194
{

0 commit comments

Comments
 (0)