summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2021-04-14 18:58:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2021-04-14 18:58:54 (GMT)
commit9cb33ddcc542ff8855a3892170d61ec1375567e4 (patch)
treeeec6cd33de783d6dbcdf6b3d00ade7d020995258 /generic/tclUtil.c
parent0b6db319f0ee6a542c2d1ad6f46b587211f882d2 (diff)
parentc942ef369bab61550b2904337f031f958da3b28e (diff)
downloadtcl-9cb33ddcc542ff8855a3892170d61ec1375567e4.zip
tcl-9cb33ddcc542ff8855a3892170d61ec1375567e4.tar.gz
tcl-9cb33ddcc542ff8855a3892170d61ec1375567e4.tar.bz2
merge 8.5; adapt fix for 8.6
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 450f3bf..9a0203e 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -2027,7 +2027,14 @@ Tcl_ConcatObj(
continue;
}
if (resPtr) {
- if (TCL_OK != Tcl_ListObjAppendList(NULL, resPtr, objPtr)) {
+ Tcl_Obj *elemPtr = NULL;
+
+ Tcl_ListObjIndex(NULL, objPtr, 0, &elemPtr);
+ if (elemPtr == NULL) {
+ continue;
+ }
+ if (Tcl_GetString(elemPtr)[0] == '#' || TCL_OK
+ != Tcl_ListObjAppendList(NULL, resPtr, objPtr)) {
/* Abandon ship! */
Tcl_DecrRefCount(resPtr);
goto slow;