diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-02-25 09:26:06 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-02-25 09:26:06 (GMT) |
| commit | aa2b48262b02b2f6f23ba7f032f8ea1fb0bddbe3 (patch) | |
| tree | 66d465f7fe9ba57603cb9f4cb7806c9622cb666f | |
| parent | a826e66f11a2823847cb7788a1d929a9799c95ad (diff) | |
| download | tcl-aa2b48262b02b2f6f23ba7f032f8ea1fb0bddbe3.zip tcl-aa2b48262b02b2f6f23ba7f032f8ea1fb0bddbe3.tar.gz tcl-aa2b48262b02b2f6f23ba7f032f8ea1fb0bddbe3.tar.bz2 | |
Fix and tests for [46dda6fc29]
| -rw-r--r-- | generic/tclUtil.c | 4 | ||||
| -rw-r--r-- | tests/dstring.test | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index e96a564..8f2c16f 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1143,13 +1143,13 @@ TclScanElement( */ requireEscape = 1; - length -= (length > 0); + length -= (length+1 > 1); p++; break; } if ((p[1] == '{') || (p[1] == '}') || (p[1] == '\\')) { extra++; /* Escape sequences all one byte longer. */ - length -= (length > 0); + length -= (length+1 > 1); p++; } forbidNone = 1; diff --git a/tests/dstring.test b/tests/dstring.test index 8699a5e..23863d0 100644 --- a/tests/dstring.test +++ b/tests/dstring.test @@ -218,7 +218,7 @@ test dstring-2.16 {appending list elements - bug [46dda6fc29] segfault} -constra testdstring get } -cleanup { testdstring free -} -result {} +} -result \\\\\\n test dstring-2.17 {appending list elements - bug [46dda6fc29] segfault} -constraints testdstring -setup { testdstring free } -body { @@ -226,7 +226,7 @@ test dstring-2.17 {appending list elements - bug [46dda6fc29] segfault} -constra testdstring get } -cleanup { testdstring free -} -result {} +} -result [list [list \{]] test dstring-2.18 {appending list elements - bug [46dda6fc29] segfault} -constraints testdstring -setup { testdstring free } -body { @@ -234,7 +234,7 @@ test dstring-2.18 {appending list elements - bug [46dda6fc29] segfault} -constra testdstring get } -cleanup { testdstring free -} -result {} +} -result [list [list \}]] test dstring-2.19 {appending list elements - bug [46dda6fc29] segfault} -constraints testdstring -setup { testdstring free } -body { @@ -242,7 +242,7 @@ test dstring-2.19 {appending list elements - bug [46dda6fc29] segfault} -constra testdstring get } -cleanup { testdstring free -} -result {} +} -result [list [list \\]] test dstring-3.1 {nested sublists} -constraints testdstring -setup { testdstring free |
