summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-25 10:16:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-25 10:16:35 (GMT)
commit7bf0253a4354d176c6582cd6f4ed02434e6c4797 (patch)
treec192192966d0ad2b30ba68914386d7e209af9028 /generic/tclExecute.c
parent826db93d76965d85df64187e05ec05095a6eae56 (diff)
parent73116e2c54973fea6efc412b979d78999df3a08a (diff)
downloadtcl-7bf0253a4354d176c6582cd6f4ed02434e6c4797.zip
tcl-7bf0253a4354d176c6582cd6f4ed02434e6c4797.tar.gz
tcl-7bf0253a4354d176c6582cd6f4ed02434e6c4797.tar.bz2
Merge 9.0
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 610b88e..9049c0a 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -5274,7 +5274,7 @@ TEBCresume(
TclNewObj(objResultPtr);
} else if (TclIsPureByteArray(valuePtr)) {
objResultPtr = Tcl_NewByteArrayObj(
- Tcl_GetBytesFromObj(NULL, valuePtr, (size_t *)NULL)+index, 1);
+ Tcl_GetByteArrayFromObj(valuePtr, (size_t *)NULL)+index, 1);
} else if (valuePtr->bytes && slength == valuePtr->length) {
objResultPtr = Tcl_NewStringObj((const char *)
valuePtr->bytes+index, 1);
@@ -5536,7 +5536,7 @@ TEBCresume(
ustring2 = Tcl_GetUnicodeFromObj(value2Ptr, &length2);
match = TclUniCharMatch(ustring1, slength, ustring2, length2,
nocase);
- } else if (TclIsPureByteArray(valuePtr) && !nocase) {
+ } else if (TclIsPureByteArray(valuePtr) && TclIsPureByteArray(value2Ptr) && !nocase) {
unsigned char *bytes1, *bytes2;
size_t wlen1 = 0, wlen2 = 0;