* regtool.c (cmd_set): Write correct number of bytes for REG_MULTI_SZ case.

This commit is contained in:
Christopher Faylor 2010-10-31 01:41:19 +00:00
parent 49808040c5
commit 418709899d
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-10-30 Dmitry Potapov <dpotapov@gmail.com>
* regtool.c (cmd_set): Write correct number of bytes for REG_MULTI_SZ
case.
2010-09-06 Corinna Vinschen <corinna@vinschen.de>
* cygpath.cc (RtlEqualUnicodePathPrefix): New helper function.
@ -1370,7 +1375,7 @@
2006-10-16 Corinna Vinschen <corinna@vinschen.de>
* regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead define
* regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead define
WINVER to 0x0502 before including windows.h.
2006-10-16 Corinna Vinschen <corinna@vinschen.de>

View File

@ -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;