summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-19 19:38:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-19 19:38:10 (GMT)
commit9589c85462da7e8d01fe0154de892c6d30d92f0d (patch)
tree748e6bc9110e6e510384467e0bddc482b5037aaa /generic/tclParse.c
parent2473a591bfbd5b346e1900e3c1088496b0d17590 (diff)
downloadtcl-9589c85462da7e8d01fe0154de892c6d30d92f0d.zip
tcl-9589c85462da7e8d01fe0154de892c6d30d92f0d.tar.gz
tcl-9589c85462da7e8d01fe0154de892c6d30d92f0d.tar.bz2
Minor optimizations
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r--generic/tclParse.c6
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;
}