summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclBinary.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index cbd9b02..3d8b24c 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -310,7 +310,7 @@ Tcl_SetByteArrayObj(
byteArrayPtr->used = length;
byteArrayPtr->allocated = length;
- if ((length != NULL) && (bytes > 0)) {
+ if ((bytes != NULL) && (length > 0)) {
memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
}
objPtr->typePtr = &tclByteArrayType;