From e5562a5757ea314abf39819b0052ed82f8a11ff8 Mon Sep 17 00:00:00 2001 From: "miloyip@gmail.com" Date: Tue, 13 Nov 2012 09:46:31 +0000 Subject: [PATCH] Fixed a mistake of r67 git-svn-id: https://rapidjson.googlecode.com/svn/trunk@69 c5894555-1306-4e8d-425f-1f6f381ee07c --- include/rapidjson/encodings.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rapidjson/encodings.h b/include/rapidjson/encodings.h index 27bb6e9..c7e8e5b 100644 --- a/include/rapidjson/encodings.h +++ b/include/rapidjson/encodings.h @@ -219,12 +219,12 @@ struct UTF16 { RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2); if (codepoint <= 0xFFFF) { RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair - os.Put(static_cast(codepoint)); + os.Put(static_cast(codepoint)); } else { RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); unsigned v = codepoint - 0x10000; - os.Put(static_cast((v >> 10) | 0xD800)); + os.Put(static_cast((v >> 10) | 0xD800)); os.Put((v & 0x3FF) | 0xDC00); } }