reg: Handle data from REG_NONE.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-02-15 23:15:31 +11:00 committed by Alexandre Julliard
parent 5061899c46
commit f1d45b5f44
2 changed files with 2 additions and 1 deletions

View File

@ -228,6 +228,7 @@ static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *r
switch (reg_type)
{
case REG_NONE:
case REG_SZ:
{
*reg_count = (lstrlenW(data) + 1) * sizeof(WCHAR);

View File

@ -149,7 +149,7 @@ static void test_add(void)
/* REG_NONE */
run_reg_exe("reg add HKCU\\" KEY_BASE " /v none0 /d deadbeef /t REG_NONE /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d\n", r);
verify_reg(hkey, "none0", REG_NONE, "d\0e\0a\0d\0b\0e\0e\0f\0\0", 18, TODO_REG_SIZE);
verify_reg(hkey, "none0", REG_NONE, "d\0e\0a\0d\0b\0e\0e\0f\0\0", 18, 0);
/* REG_SZ */
run_reg_exe("reg add HKCU\\" KEY_BASE " /d WineTest /f", &r);