diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-11 19:30:42 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-11 19:30:42 (GMT) |
commit | 0ad251426f08aff23e62fff6365bafc1af4e182f (patch) | |
tree | e27700ed8c7b156d4def38a90ab9d4b47194999e /win/tclWinReg.c | |
parent | fcb1a092aeea82d23c7d8957f677c0af36fc7371 (diff) | |
parent | c31e9810372c9b7fb8b61dd0840ed8f87ecf79f0 (diff) | |
download | tcl-0ad251426f08aff23e62fff6365bafc1af4e182f.zip tcl-0ad251426f08aff23e62fff6365bafc1af4e182f.tar.gz tcl-0ad251426f08aff23e62fff6365bafc1af4e182f.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.
Diffstat (limited to 'win/tclWinReg.c')
-rw-r--r-- | win/tclWinReg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 565188c..d2f233e 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -780,7 +780,7 @@ GetValue( * HKEY_PERFORMANCE_DATA */ - length *= 2; + length = Tcl_DStringLength(&data) * (2 / sizeof(TCHAR)); Tcl_DStringSetLength(&data, (int) length * sizeof(TCHAR)); result = RegQueryValueEx(key, nativeValue, NULL, &type, (BYTE *) Tcl_DStringValue(&data), &length); |