summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2010-09-22 01:08:49 (GMT)
committerKevin B Kenny <kennykb@acm.org>2010-09-22 01:08:49 (GMT)
commitb915b5fe069f09a9bd7dec58b31623b29133be2f (patch)
tree6a13b2ab5f2e5e8d8efdb0e725da6876b66445ad /win/tclWinPipe.c
parent53ebe37f0445f1a132bd20729d41894c6470622a (diff)
downloadtcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.zip
tcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.tar.gz
tcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.tar.bz2
merge changes from HEAD
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r--win/tclWinPipe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index a41898d..84b18b6 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPipe.c,v 1.83 2010/09/20 14:28:15 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinPipe.c,v 1.83.2.1 2010/09/22 01:08:49 kennykb Exp $
*/
#include "tclWinInt.h"
@@ -3133,8 +3133,8 @@ TclpOpenTemporaryFile(
sprintf(number, "%d.TMP", counter);
counter = (unsigned short) (counter + 1);
tclWinProcs->utf2tchar(number, strlen(number), &buf);
- memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf));
- *(WCHAR *)(namePtr + Tcl_DStringLength(&buf) + 1) = '\0';
+ Tcl_DStringSetLength(&buf, Tcl_DStringLength(&buf) + 1);
+ memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf) + 1);
Tcl_DStringFree(&buf);
handle = tclWinProcs->createFileProc((TCHAR *) name,