Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-10-31 04:41:19 +0300
committerChristopher Faylor <me@cgf.cx>2010-10-31 04:41:19 +0300
commit418709899d72656f8cbaa559c3473e582c9c5269 (patch)
treeb896e14a305efe7c505990f0a781a1b6a78d9641 /winsup/utils/regtool.cc
parent49808040c5fa1390983945d38c7e8267b2b8a381 (diff)
* regtool.c (cmd_set): Write correct number of bytes for REG_MULTI_SZ case.
Diffstat (limited to 'winsup/utils/regtool.cc')
-rw-r--r--winsup/utils/regtool.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
index c51479d60..0da7ecad0 100644
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -711,7 +711,7 @@ cmd_set ()
n += mbstowcs ((wchar_t *) data + n, argv[i], max_n - n) + 1;
((wchar_t *)data)[n] = L'\0';
rv = RegSetValueExW (key, value, 0, REG_MULTI_SZ, (const BYTE *) data,
- (max_n + 1) * sizeof (wchar_t));
+ (n + 1) * sizeof (wchar_t));
break;
case REG_AUTO:
rv = ERROR_SUCCESS;