summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-08-17 14:12:31 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-08-17 14:12:31 (GMT)
commite71ae54f3cf2a1891087cd55f8f11190fc75502f (patch)
treeaea585ac64e29663faac8bc607d5b2a1bf36bb44 /generic/tclUtil.c
parentec91379b479892b2b46e0cfa0aaa5a990a2fdd09 (diff)
downloadtcl-e71ae54f3cf2a1891087cd55f8f11190fc75502f.zip
tcl-e71ae54f3cf2a1891087cd55f8f11190fc75502f.tar.gz
tcl-e71ae54f3cf2a1891087cd55f8f11190fc75502f.tar.bz2
* generic/tclTest.c (TestconcatobjCmd):
* generic/tclUtil.c (Tcl_ConcatObj): * tests/util.test (util-4.7): fix [Bug 1447328]; the original "fix" turned Tcl_ConcatObj() into a hairy monster. This was exposed by [Bug 2055782]. Additionally, Tcl_ConcatObj could corrupt its input under certain conditions! *** NASTY BUG FIXED ***
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 07fbc87..e2f01a4 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtil.c,v 1.97 2008/02/26 20:18:14 hobbs Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.97.2.1 2008/08/17 14:12:35 msofer Exp $
*/
#include "tclInt.h"
@@ -1197,11 +1197,7 @@ Tcl_ConcatObj(
if (resPtr) {
Tcl_ListObjReplace(NULL, resPtr, INT_MAX, 0, listc, listv);
} else {
- if (Tcl_IsShared(objPtr)) {
- resPtr = TclListObjCopy(NULL, objPtr);
- } else {
- resPtr = objPtr;
- }
+ resPtr = TclListObjCopy(NULL, objPtr);
}
}
}