minor warning fix

v1
Brett 2023-02-06 21:54:01 -05:00
parent 12a5985916
commit d25cdd9de0
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ namespace blt::string {
for (int i = 0; i < strlen; i++) { for (int i = 0; i < strlen; i++) {
unsigned char c = str[i]; unsigned char c = str[i];
if (c >= 0x80 || c == 0) if (c >= 0x80 || c == 0)
utflen += (c >= 0x800) ? 2 : 1; utflen += 1;
} }
if (utflen > 65535 || /* overflow */ utflen < strlen) if (utflen > 65535 || /* overflow */ utflen < strlen)