diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-07-11 19:24:12 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-07-11 19:24:12 (GMT) |
commit | 031be3ad826cad64142c5df1beba9d11669bf6fd (patch) | |
tree | 37f171a4b263d41bda7476cc74cbf8bfc82833d6 | |
parent | 95f2cf80d425b2769ea1268ebf10f191f0899bb9 (diff) | |
download | tcl-031be3ad826cad64142c5df1beba9d11669bf6fd.zip tcl-031be3ad826cad64142c5df1beba9d11669bf6fd.tar.gz tcl-031be3ad826cad64142c5df1beba9d11669bf6fd.tar.bz2 |
[Bug #3362446]: registry keys command fails with 8.5/8.6. Follow Microsofts example better in order to prevent problems when using HKEY_PERFORMANCE_DATA.
Forgot one important '%'
FossilOrigin-Name: b27068f63ecf39d5d2841ea95350711f671302b8
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | win/tclWinPipe.c | 2 | ||||
-rw-r--r-- | win/tclWinReg.c | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2012-07-11 Jan Nijtmans <nijtmans@users.sf.net> + + * win/tclWinReg.c: [Bug #3362446]: registry keys command fails + with 8.5/8.6. Follow Microsofts example better in order to prevent + problems when using HKEY_PERFORMANCE_DATA. + 2012-07-10 Jan Nijtmans <nijtmans@users.sf.net> * unix/tclUnixNotfy.c: [Bug 3541646] Don't panic on triggerPipe overrun diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 9a529d2..b6764d4 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -1707,7 +1707,7 @@ TclpCreateCommandChannel( * unique, in case channels share handles (stdin/stdout). */ - sprintf(channelName, "file" TCL_I_MODIFIER "x", (size_t)infoPtr); + sprintf(channelName, "file%" TCL_I_MODIFIER "x", (size_t)infoPtr); infoPtr->channel = Tcl_CreateChannel(&pipeChannelType, channelName, (ClientData) infoPtr, infoPtr->validMask); diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 343a22f..a6ce2ce 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -794,7 +794,7 @@ GetValue( * HKEY_PERFORMANCE_DATA */ - length *= 2; + length = Tcl_DStringLength(&data) * (regWinProcs->useWide ? 1 : 2); Tcl_DStringSetLength(&data, (int) length * (regWinProcs->useWide ? 2 : 1)); result = (*regWinProcs->regQueryValueExProc)(key, (char *) nativeValue, NULL, &type, (BYTE *) Tcl_DStringValue(&data), &length); |