diff options
author | dgp <dgp@users.sourceforge.net> | 2011-03-03 21:13:30 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-03-03 21:13:30 (GMT) |
commit | 230ba711f1d811e0a7506e2f6496f8f926736b98 (patch) | |
tree | 39aeb39051104d8d0ea80ffa444c92865c510c60 | |
parent | 5d294f21f3246e11d281ba4b90fdca50874587a9 (diff) | |
download | tcl-230ba711f1d811e0a7506e2f6496f8f926736b98.zip tcl-230ba711f1d811e0a7506e2f6496f8f926736b98.tar.gz tcl-230ba711f1d811e0a7506e2f6496f8f926736b98.tar.bz2 |
Correct flaw in the rewrite handling [list \\\\\}].
-rw-r--r-- | generic/tclUtil.c | 2 | ||||
-rw-r--r-- | tests/list.test | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 9358ede..558d77b 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -756,7 +756,7 @@ TclScanElement( p++; break; } - if ((p[1] == '{') || (p[1] == '}')) { + if ((p[1] == '{') || (p[1] == '}') || (p[1] == '\\')) { extra++; length -= (length > 0); p++; diff --git a/tests/list.test b/tests/list.test index aab165c..5a002a9 100644 --- a/tests/list.test +++ b/tests/list.test @@ -105,6 +105,10 @@ test list-3.1 {SetListFromAny and lrange/concat results} { slowsort {fred julie alex carol bill annie} } {alex annie bill carol fred julie} +test list-4.1 {Bug 3173086} { + string is list "{[list \\\\\}]}" +} 1 + # cleanup ::tcltest::cleanupTests return |