diff options
author | hobbs <hobbs@noemail.net> | 2001-07-03 03:33:42 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2001-07-03 03:33:42 (GMT) |
commit | 1e0492636b80680f9d906cb7b9329ba3e66f46ff (patch) | |
tree | e2f5f1ab81eccd23d114821616c79cee33b56fde /generic | |
parent | d98599db2c303f927baf1f862c788fc73b863ec6 (diff) | |
download | tcl-1e0492636b80680f9d906cb7b9329ba3e66f46ff.zip tcl-1e0492636b80680f9d906cb7b9329ba3e66f46ff.tar.gz tcl-1e0492636b80680f9d906cb7b9329ba3e66f46ff.tar.bz2 |
* tests/util.test: added util-4.6
* generic/tclUtil.c (Tcl_ConcatObj): Corrected walking backwards
over utf-8 chars. [Bug #227512]
FossilOrigin-Name: 8ee4571bc620e35190a9217409e007663b749a6a
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclUtil.c | 10 |
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--; } |