summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
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)) {