Skip to content

Commit

Permalink
add comment to explain corner case
Browse files Browse the repository at this point in the history
  • Loading branch information
arnej27959 committed Dec 19, 2024
1 parent 25d6293 commit 53a27ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ getUCS4Char(const char *src)
fprintf(stderr, "Warning: extra character from '%s' -> U+%04x U+%04X\n",
input, result, extra);
}
// mangle two characters into one fake UCS4 number
// (in theory we should compare vector<UCS4>, but this is good enough)
result |= (extra << 16);
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ getUCS4Char(const char *src)
fprintf(stderr, "Warning: extra character from '%s' -> U+%04x U+%04X\n",
input, result, extra);
}
// mangle two characters into one fake UCS4 number
// (in theory we should compare vector<UCS4>, but this is good enough)
result |= (extra << 16);
}
return result;
Expand Down

0 comments on commit 53a27ec

Please sign in to comment.