summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2007-11-09 18:50:52 (GMT)
committerhobbs <hobbs>2007-11-09 18:50:52 (GMT)
commit51c3524facba45f2ebda897b58b073fb0e932024 (patch)
treed5da72e028a2f4cf64f5305519ef350919fb8b55 /generic/tclBinary.c
parent042b311771f4566336d524ad5dcb27fb03efa804 (diff)
downloadtcl-51c3524facba45f2ebda897b58b073fb0e932024.zip
tcl-51c3524facba45f2ebda897b58b073fb0e932024.tar.gz
tcl-51c3524facba45f2ebda897b58b073fb0e932024.tar.bz2
* generic/tclBinary.c (Tcl_GetByteArrayFromObj): check type before
func jump
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r--generic/tclBinary.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index e47f40f..2cfaff5 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBinary.c,v 1.36 2007/09/07 00:34:06 dgp Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.37 2007/11/09 18:50:54 hobbs Exp $
*/
#include "tclInt.h"
@@ -310,7 +310,9 @@ Tcl_GetByteArrayFromObj(
{
ByteArray *baPtr;
- SetByteArrayFromAny(NULL, objPtr);
+ if (objPtr->typePtr != &tclByteArrayType) {
+ SetByteArrayFromAny(NULL, objPtr);
+ }
baPtr = GET_BYTEARRAY(objPtr);
if (lengthPtr != NULL) {