summaryrefslogtreecommitdiffstats
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
parent042b311771f4566336d524ad5dcb27fb03efa804 (diff)
downloadtcl-51c3524facba45f2ebda897b58b073fb0e932024.zip
tcl-51c3524facba45f2ebda897b58b073fb0e932024.tar.gz
tcl-51c3524facba45f2ebda897b58b073fb0e932024.tar.bz2
* generic/tclBinary.c (Tcl_GetByteArrayFromObj): check type before
func jump
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclBinary.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6947e61..9861697 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-09 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tclBinary.c (Tcl_GetByteArrayFromObj): check type before
+ func jump
+
2007-11-07 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tclStubInit.c: added TclByteArrayMatch
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) {