summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-02-23 16:55:49 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-02-23 16:55:49 (GMT)
commit85233a46935b192d7baf5fa81c9ad21bfebeca77 (patch)
tree7a40c869d6db73a096af09bd6033e49b1810cec0 /generic
parent189d0a83d2df3b9f47e30232bdf377d4daeaba2b (diff)
downloadtcl-85233a46935b192d7baf5fa81c9ad21bfebeca77.zip
tcl-85233a46935b192d7baf5fa81c9ad21bfebeca77.tar.gz
tcl-85233a46935b192d7baf5fa81c9ad21bfebeca77.tar.bz2
[8e6a9ac221] Stop false matching with bytearrays. (string-11.55)
Diffstat (limited to 'generic')
-rw-r--r--generic/tclUtil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 34d4be2..d782ea1 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -2340,7 +2340,8 @@ TclStringMatchObj(
udata = Tcl_GetUnicodeFromObj(strObj, &length);
uptn = Tcl_GetUnicodeFromObj(ptnObj, &plen);
match = TclUniCharMatch(udata, length, uptn, plen, flags);
- } else if (TclIsPureByteArray(strObj) && !flags) {
+ } else if (TclIsPureByteArray(strObj) && TclIsPureByteArray(ptnObj)
+ && !flags) {
unsigned char *data, *ptn;
data = Tcl_GetByteArrayFromObj(strObj, &length);