summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclUtil.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index e29afcc..01548ae 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -802,9 +802,11 @@ TclCopyAndCollapse(
char c = *src;
if (c == '\\') {
+ char buf[4] = "";
int numRead;
- int backslashCount = TclParseBackslash(src, count, &numRead, dst);
+ int backslashCount = TclParseBackslash(src, count, &numRead, &buf);
+ memcpy(dst, buf, backslashCount);
dst += backslashCount;
newCount += backslashCount;
src += numRead;