diff options
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r-- | generic/tclParse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index ccb648c..8d07f7f 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -939,9 +939,9 @@ TclParseBackslash( *readPtr = count; } count = Tcl_UniCharToUtf(result, dst); - if (!count) { - /* Special case for handling upper surrogates. */ - count = Tcl_UniCharToUtf(-1, dst); + if ((result >= 0xD800) && (count < 3)) { + /* Special case for handling high surrogates. */ + count += Tcl_UniCharToUtf(-1, dst + count); } return count; } |