summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-05-01 07:38:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-05-01 07:38:27 (GMT)
commit1c52941e5f67f7f374dbc110234bf18a7ac4844a (patch)
tree4f49557b0fc34ae6f65fc299aaadf9d60bfcc691 /generic/tclUtil.c
parent7df749abdc0780eb176e6fade94388d60cd8a0ef (diff)
downloadtcl-1c52941e5f67f7f374dbc110234bf18a7ac4844a.zip
tcl-1c52941e5f67f7f374dbc110234bf18a7ac4844a.tar.gz
tcl-1c52941e5f67f7f374dbc110234bf18a7ac4844a.tar.bz2
Fix more corner-cases like [0e92c404f19ede5b2eb06e6db27647d3138cc56|0e92c404f1]: The only place where a type of &tclByteArrayType can be trusted is when determining its length, because the character length of a (UTF-8) string is always equal to the byte length of the byte array.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 5f4cdae..8c6adfe 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -2334,7 +2334,7 @@ TclStringMatchObj(
udata = Tcl_GetUnicodeFromObj(strObj, &length);
uptn = Tcl_GetUnicodeFromObj(ptnObj, &plen);
match = TclUniCharMatch(udata, length, uptn, plen, flags);
- } else if ((strObj->typePtr == &tclByteArrayType) && !flags) {
+ } else if (TclIsPureByteArray(strObj) && !flags) {
unsigned char *data, *ptn;
data = Tcl_GetByteArrayFromObj(strObj, &length);