summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-08 09:37:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-08 09:37:12 (GMT)
commitcb0acd5a7dde2f72ebeb544c6fc6aa0b5c53c4db (patch)
treec13b7c56d44e18a34ad5a3dd6d2af3a8db98977b /generic/tclStringObj.c
parent4717ea14fde569dbc9d0c0addb817fae41e30862 (diff)
parent82a4b8a569583a68f0c54c9f31321412cf06d709 (diff)
downloadtcl-cb0acd5a7dde2f72ebeb544c6fc6aa0b5c53c4db.zip
tcl-cb0acd5a7dde2f72ebeb544c6fc6aa0b5c53c4db.tar.gz
tcl-cb0acd5a7dde2f72ebeb544c6fc6aa0b5c53c4db.tar.bz2
Merge 9.0
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index fbb6312..c8c6081 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -2125,10 +2125,12 @@ Tcl_AppendFormatToObj(
goto error;
}
length = Tcl_UniCharToUtf(code, buf);
+#if TCL_UTF_MAX < 4
if ((code >= 0xD800) && (length < 3)) {
/* Special case for handling high surrogates. */
length += Tcl_UniCharToUtf(-1, buf + length);
}
+#endif
segment = Tcl_NewStringObj(buf, length);
Tcl_IncrRefCount(segment);
allocSegment = 1;