diff options
author | stwo <stwo> | 2012-09-16 15:51:55 (GMT) |
---|---|---|
committer | stwo <stwo> | 2012-09-16 15:51:55 (GMT) |
commit | 0807baacce4a33e3515110feb33689c90b397f80 (patch) | |
tree | dea30e5ade8cbefcc5ddfa6fea1ded345b13976b | |
parent | 18b6945d86ecf2b58a0d39e7f17885f692f19a87 (diff) | |
download | tcl-0807baacce4a33e3515110feb33689c90b397f80.zip tcl-0807baacce4a33e3515110feb33689c90b397f80.tar.gz tcl-0807baacce4a33e3515110feb33689c90b397f80.tar.bz2 |
Nicer style test.
-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..cbd9b02 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 ((length != NULL) && (bytes > 0)) { memcpy(byteArrayPtr->bytes, bytes, (size_t) length); } - objPtr->typePtr = &tclByteArrayType; SET_BYTEARRAY(objPtr, byteArrayPtr); } |