Subject: Better (safer) fix for [0e92c404f1]

From: "jan.nijtmans" <[email-masked]>
Date: Wed, 30 Apr 2014 21:59:00 +0000

---
 generic/tclCmdMZ.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {
-- 
cgit v0.12