diff options
author | dgp <dgp@users.sourceforge.net> | 2018-02-23 16:55:49 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2018-02-23 16:55:49 (GMT) |
commit | 85233a46935b192d7baf5fa81c9ad21bfebeca77 (patch) | |
tree | 7a40c869d6db73a096af09bd6033e49b1810cec0 /generic | |
parent | 189d0a83d2df3b9f47e30232bdf377d4daeaba2b (diff) | |
download | tcl-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.c | 3 |
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); |