update some sense warning from -Wconversion

This commit is contained in:
hathach
2021-10-15 15:54:32 +07:00
parent 9da234cd7c
commit 7596cb3079
6 changed files with 11 additions and 12 deletions

View File

@@ -261,7 +261,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid)
const char* str = string_desc_arr[index];
// Cap at max char
chr_count = strlen(str);
chr_count = (uint8_t) strlen(str);
if ( chr_count > 31 ) chr_count = 31;
// Convert ASCII string into UTF-16