diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-15 16:20:40 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-15 16:20:40 (GMT) |
commit | cb794e731c3d27894fe2df57ef87416755b2d01d (patch) | |
tree | b3ff995e311e3d6e12ef6166154a449e65dc5a59 /generic/tclUtil.c | |
parent | b4660a7ff9a3dac758b033af3fd7618db6a68b9d (diff) | |
parent | c6e348a28b0d74bc880f56b2f2db6f8c97f1b6ca (diff) | |
download | tcl-cb794e731c3d27894fe2df57ef87416755b2d01d.zip tcl-cb794e731c3d27894fe2df57ef87416755b2d01d.tar.gz tcl-cb794e731c3d27894fe2df57ef87416755b2d01d.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 5 |
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)) { |