summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-04-30 21:59:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-04-30 21:59:00 (GMT)
commit7df749abdc0780eb176e6fade94388d60cd8a0ef (patch)
tree50ffe756109da92113fc863224074a016638107f
parent1c909a3352991d577a7164d5bb33dbe8d295ae67 (diff)
downloadtcl-7df749abdc0780eb176e6fade94388d60cd8a0ef.zip
tcl-7df749abdc0780eb176e6fade94388d60cd8a0ef.tar.gz
tcl-7df749abdc0780eb176e6fade94388d60cd8a0ef.tar.bz2
Better (safer) fix for [0e92c404f1]
-rw-r--r--generic/tclCmdMZ.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 6fd468c..d106f53 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -2086,7 +2086,7 @@ StringRangeCmd(
* Unicode string rep to get the range.
*/
- if (objv[1]->typePtr == &tclByteArrayType) {
+ if (objv[1]->typePtr == &tclByteArrayType && (objv[1]->bytes==NULL)) {
string = Tcl_GetByteArrayFromObj(objv[1], &length);
length--;
} else {