Skip to content

Commit

Permalink
Update vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Oct 9, 2023
1 parent 7f3a3c2 commit 544feb3
Show file tree
Hide file tree
Showing 3 changed files with 1,028 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ namespace utf8
{
while (start != end) {
uint32_t cp = utf8::internal::mask16(*start++);
// Take care of surrogate pairs first
if (start == end)
return result;
// Take care of surrogate pairs first
if (utf8::internal::is_lead_surrogate(cp)) {
uint32_t trail_surrogate = utf8::internal::mask16(*start++);
cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET;
Expand Down
Loading

0 comments on commit 544feb3

Please sign in to comment.