BAN: Return UTF::invalid from byte_length instead of 0

This commit is contained in:
2025-06-02 10:46:15 +03:00
parent 4656b11256
commit e9f8471a28
4 changed files with 9 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ namespace BAN::UTF8
return 3;
if ((first_byte & 0xF8) == 0xF0)
return 4;
return 0;
return UTF8::invalid;
}
template<typename T> requires (sizeof(T) == 1)