Skip to content

Commit 74ba5e4

Browse files
author
jan.nijtmans
committed
Fix special-case in SetDuplicatePureObj(): Since typePtr is always &tclListType (ALL current calls to TclDuplicatePureObj() have &tclListType as last argument), this constructions can never work.
(I'm not sure this code is usefull at all, but that's for another day)
1 parent 56aabaf commit 74ba5e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

generic/tclObj.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1675,10 +1675,10 @@ int SetDuplicatePureObj(
16751675

16761676
if (bytes && (dupPtr->typePtr == NULL
16771677
|| dupPtr->typePtr->updateStringProc == NULL
1678-
|| typePtr == &tclUniCharStringType
1679-
|| typePtr == &tclDoubleType
1680-
|| typePtr == &tclIntType
1681-
|| typePtr == &tclIndexType
1678+
|| objPtr->typePtr == &tclUniCharStringType
1679+
|| objPtr->typePtr == &tclDoubleType
1680+
|| objPtr->typePtr == &tclIntType
1681+
|| objPtr->typePtr == &tclIndexType
16821682
)
16831683
) {
16841684
if (!TclAttemptInitStringRep(dupPtr, bytes, objPtr->length)) {

0 commit comments

Comments
 (0)