diff options
Diffstat (limited to 'Source/cm_utf8.c')
-rw-r--r-- | Source/cm_utf8.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cm_utf8.c b/Source/cm_utf8.c index 52af4a6..2459c02 100644 --- a/Source/cm_utf8.c +++ b/Source/cm_utf8.c @@ -71,6 +71,11 @@ const char* cm_utf8_decode_character(const char* first, const char* last, return 0; } + /* UTF-16 surrogate halves. */ + if (0xD800 <= uc && uc <= 0xDFFF) { + return 0; + } + *pc = uc; return first; } |