From 74ba5e43366e0389ca88d043c0041a0a18fd9afa Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 12 Jul 2023 15:09:52 +0000 Subject: 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) --- generic/tclObj.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclObj.c b/generic/tclObj.c index 731196f..bd1055e 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -1675,10 +1675,10 @@ int SetDuplicatePureObj( if (bytes && (dupPtr->typePtr == NULL || dupPtr->typePtr->updateStringProc == NULL - || typePtr == &tclUniCharStringType - || typePtr == &tclDoubleType - || typePtr == &tclIntType - || typePtr == &tclIndexType + || objPtr->typePtr == &tclUniCharStringType + || objPtr->typePtr == &tclDoubleType + || objPtr->typePtr == &tclIntType + || objPtr->typePtr == &tclIndexType ) ) { if (!TclAttemptInitStringRep(dupPtr, bytes, objPtr->length)) { -- cgit v0.12