From 6d007749d44145fe42cc100a5d5ed9b54e73fa29 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 21 Jan 2014 08:03:57 -0800 Subject: [PATCH] Fix dumb typo in surrogate pair check. --- util/text/utf16.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/text/utf16.h b/util/text/utf16.h index 75f8b3ee02..002886259d 100644 --- a/util/text/utf16.h +++ b/util/text/utf16.h @@ -25,7 +25,7 @@ public: const uint32_t u = UTF16_Swap(c_[index_++]); // Surrogate pair. UTF-16 is so simple. We assume it's valid. - if ((u & 0xD800) == 0xD800) { + if ((u & 0xF800) == 0xD800) { return 0x10000 + (((u & 0x3FF) << 10) | (UTF16_Swap(c_[index_++]) & 0x3FF)); } return u;