summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-15 16:20:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-15 16:20:40 (GMT)
commitcb794e731c3d27894fe2df57ef87416755b2d01d (patch)
treeb3ff995e311e3d6e12ef6166154a449e65dc5a59 /generic/tclUtil.c
parentb4660a7ff9a3dac758b033af3fd7618db6a68b9d (diff)
parentc6e348a28b0d74bc880f56b2f2db6f8c97f1b6ca (diff)
downloadtcl-cb794e731c3d27894fe2df57ef87416755b2d01d.zip
tcl-cb794e731c3d27894fe2df57ef87416755b2d01d.tar.gz
tcl-cb794e731c3d27894fe2df57ef87416755b2d01d.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 1288738..eef6393 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -1708,6 +1708,9 @@ TclTrimRight(
int pInc = 0, bytesLeft = numTrim;
pp = TclUtfPrev(p, bytes);
+#if TCL_UTF_MAX < 4
+ pp = TclUtfPrev(pp, bytes);
+#endif
do {
pp += pInc;
pInc = TclUtfToUCS4(pp, &ch1);
@@ -1771,7 +1774,7 @@ TclTrimLeft(
* rely on (trim[numTrim] == '\0'). */
{
const char *p = bytes;
- int ch1, ch2;
+ int ch1, ch2;
/* Empty strings -> nothing to do */
if ((numBytes == 0) || (numTrim == 0)) {