Fix utf8 check split code point at buffer end

This commit is contained in:
Vinnie Falco committed 2017-08-31 17:52:36 -07:00
1 parent c8a42bba0a
commit 9f089c2a33
3 files changed
+95 -25

No files matched your search

@@ -173,13 +173,13 @@ write(std::uint8_t const* in, std::size_t size)
{
if(v < 128)
return 1;
if(v < 194)
if(v < 192)
return 0;
if(v < 224)
return 2;
if(v < 240)
return 3;
if(v < 245)
if(v < 248)
return 4;
return 0;
};