summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-07-03 03:33:42 (GMT)
committerhobbs <hobbs>2001-07-03 03:33:42 (GMT)
commit970995d516c48cff4a1d54a83ea6b8281b28f6ae (patch)
treee2f5f1ab81eccd23d114821616c79cee33b56fde /generic/tclUtil.c
parentf95adc31b2b6a26b68eaafb67a0438c3989bc458 (diff)
downloadtcl-970995d516c48cff4a1d54a83ea6b8281b28f6ae.zip
tcl-970995d516c48cff4a1d54a83ea6b8281b28f6ae.tar.gz
tcl-970995d516c48cff4a1d54a83ea6b8281b28f6ae.tar.bz2
* tests/util.test: added util-4.6
* generic/tclUtil.c (Tcl_ConcatObj): Corrected walking backwards over utf-8 chars. [Bug #227512]
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index bd75075..340d004 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtil.c,v 1.19 2001/06/04 01:25:04 hobbs Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.20 2001/07/03 03:33:42 hobbs Exp $
*/
#include "tclInt.h"
@@ -1071,8 +1071,8 @@ Tcl_ConcatObj(objc, objv)
for (i = 0; i < objc; i++) {
objPtr = objv[i];
element = Tcl_GetStringFromObj(objPtr, &elemLength);
- while ((elemLength > 0)
- && (isspace(UCHAR(*element)))) { /* INTL: ISO space. */
+ while ((elemLength > 0) && (UCHAR(*element) < 127)
+ && isspace(UCHAR(*element))) { /* INTL: ISO C space. */
element++;
elemLength--;
}
@@ -1083,8 +1083,8 @@ Tcl_ConcatObj(objc, objv)
* this case it could be significant.
*/
- while ((elemLength > 0)
- && isspace(UCHAR(element[elemLength-1])) /* INTL: ISO space. */
+ while ((elemLength > 0) && (UCHAR(element[elemLength-1]) < 127)
+ && isspace(UCHAR(element[elemLength-1])) /* INTL: ISO C space. */
&& ((elemLength < 2) || (element[elemLength-2] != '\\'))) {
elemLength--;
}