diff options
author | dgp <dgp@users.sourceforge.net> | 2012-09-17 12:26:06 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-09-17 12:26:06 (GMT) |
commit | 9a1e05642daa7aaeddbac912094ac5caedb797f7 (patch) | |
tree | 17765f5a0b5ac0c01d726739b865dc1f6d0b794b /generic/tclBinary.c | |
parent | d25924729fd7ab6a77584dcca40120ac182140f3 (diff) | |
parent | b010f2f6d941bf70ee1512bcf70c3a4714dcf996 (diff) | |
download | tcl-9a1e05642daa7aaeddbac912094ac5caedb797f7.zip tcl-9a1e05642daa7aaeddbac912094ac5caedb797f7.tar.gz tcl-9a1e05642daa7aaeddbac912094ac5caedb797f7.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r-- | generic/tclBinary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 4953e27..3d8b24c 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -309,10 +309,10 @@ Tcl_SetByteArrayObj( byteArrayPtr = ckalloc(BYTEARRAY_SIZE(length)); byteArrayPtr->used = length; byteArrayPtr->allocated = length; - if (length && bytes) { + + if ((bytes != NULL) && (length > 0)) { memcpy(byteArrayPtr->bytes, bytes, (size_t) length); } - objPtr->typePtr = &tclByteArrayType; SET_BYTEARRAY(objPtr, byteArrayPtr); } |