Fix typo in UTF-16 surrogate pairs.

This commit is contained in:
Unknown W. Brackets 2013-07-21 12:55:28 -07:00
parent 7421e1de67
commit dd99cfbbe8

View File

@ -55,7 +55,7 @@ public:
static int encode(uint16_t *dest, uint32_t u) {
if (u >= 0x10000) {
u -= 0x10000;
*dest = UTF16_Swap<is_little>(0xD800 + ((u >> 10) & 0x3FF));
*dest++ = UTF16_Swap<is_little>(0xD800 + ((u >> 10) & 0x3FF));
*dest = UTF16_Swap<is_little>(0xDC00 + ((u >> 0) & 0x3FF));
return 2;
} else {