diff options
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r-- | generic/tclParse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index 8ea5d45..7beaeea 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -923,13 +923,13 @@ TclParseBackslash( */ result = 'u'; #if TCL_UTF_MAX > 3 - } else if (((result & 0xDC00) == 0xD800) && (count == 6) + } else if (((result & 0xFC00) == 0xD800) && (count == 6) && (p[5] == '\\') && (p[6] == 'u') && (numBytes >= 10)) { /* If high surrogate is immediately followed by a low surrogate * escape, combine them into one character. */ int low; int count2 = ParseHex(p+7, 4, &low); - if ((count2 == 4) && ((low & 0xDC00) == 0xDC00)) { + if ((count2 == 4) && ((low & 0xFC00) == 0xDC00)) { result = ((result & 0x3FF)<<10 | (low & 0x3FF)) + 0x10000; count += count2 + 2; } |