Commit 8a8a2c9b authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Correctly export REG_DWORD values with no data.

parent aabdc271
......@@ -1345,8 +1345,12 @@ static void export_data(FILE *fp, WCHAR *value_name, DWORD value_len, DWORD type
export_string_data(&buf, data, size);
break;
case REG_DWORD:
export_dword_data(&buf, data);
break;
if (size)
{
export_dword_data(&buf, data);
break;
}
/* fall through */
case REG_NONE:
case REG_EXPAND_SZ:
case REG_BINARY:
......
......@@ -3588,7 +3588,7 @@ static void test_export(void)
RegCloseKey(hkey);
run_regedit_exe("regedit.exe /e file.reg HKEY_CURRENT_USER\\" KEY_BASE);
ok(compare_export("file.reg", empty_hex_test, TODO_REG_COMPARE), "compare_export() failed\n");
ok(compare_export("file.reg", empty_hex_test, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, KEY_BASE);
......@@ -3605,7 +3605,7 @@ static void test_export(void)
RegCloseKey(hkey);
run_regedit_exe("regedit.exe /e file.reg HKEY_CURRENT_USER\\" KEY_BASE);
ok(compare_export("file.reg", empty_hex_test2, TODO_REG_COMPARE), "compare_export() failed\n");
ok(compare_export("file.reg", empty_hex_test2, 0), "compare_export() failed\n");
delete_key(HKEY_CURRENT_USER, KEY_BASE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment