diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-06-02 22:12:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-06-02 22:12:10 (GMT) |
commit | 6b77d746e14448e59cefaa68614514bd8d7f2ec2 (patch) | |
tree | 94d8366315db5811c2658fca29c34142d24bc707 /generic/tclInt.h | |
parent | b37dff78c10adba0c58f275d277060fa4f82d18e (diff) | |
parent | 7e152743beb2995911a1a99c808a5e52ede08d6d (diff) | |
download | tcl-6b77d746e14448e59cefaa68614514bd8d7f2ec2.zip tcl-6b77d746e14448e59cefaa68614514bd8d7f2ec2.tar.gz tcl-6b77d746e14448e59cefaa68614514bd8d7f2ec2.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 0e7e497..47e514f 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4583,9 +4583,9 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, TclInitEmptyStringRep(objPtr) \ ) : ( \ (objPtr)->bytes = (char *)Tcl_AttemptAlloc((len) + 1U), \ - memcpy((objPtr)->bytes, (bytePtr) ? (bytePtr) : &tclEmptyString, (len)), \ - (objPtr)->bytes[len] = '\0', \ - (objPtr)->length = (len) \ + (objPtr)->length = ((objPtr)->bytes) ? \ + (memcpy((objPtr)->bytes, (bytePtr) ? (bytePtr) : &tclEmptyString, (len)), \ + (objPtr)->bytes[len] = '\0', (len)) : (-1) \ )), (objPtr)->bytes) /* |