Commit 84dda235 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Correctly import hex values with no data.

parent 56b223ad
......@@ -885,6 +885,9 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
{
WCHAR *line = pos;
if (!*line)
goto set_value;
if (!convert_hex_csv_to_hex(parser, &line))
goto invalid;
......@@ -896,6 +899,7 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
prepare_hex_string_data(parser);
set_value:
set_state(parser, SET_VALUE);
return line;
......
......@@ -662,10 +662,10 @@ static void test_basic_import(void)
"\"Wine22h\"=hex:\n"
"\"Wine22i\"=hex(0):\n\n");
verify_reg(hkey, "Wine22a", REG_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine22b", REG_EXPAND_SZ, NULL, 0, TODO_REG_SIZE);
verify_reg(hkey, "Wine22b", REG_EXPAND_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine22c", REG_BINARY, NULL, 0, 0);
verify_reg(hkey, "Wine22d", REG_DWORD, NULL, 0, 0);
verify_reg(hkey, "Wine22e", REG_MULTI_SZ, NULL, 0, TODO_REG_SIZE);
verify_reg(hkey, "Wine22e", REG_MULTI_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine22f", 0x100, NULL, 0, 0);
verify_reg(hkey, "Wine22g", 0xabcd, NULL, 0, 0);
verify_reg(hkey, "Wine22h", REG_BINARY, NULL, 0, 0);
......@@ -1077,10 +1077,10 @@ static void test_basic_import_unicode(void)
"\"Wine22h\"=hex:\n"
"\"Wine22i\"=hex(0):\n\n");
verify_reg(hkey, "Wine22a", REG_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine22b", REG_EXPAND_SZ, NULL, 0, TODO_REG_SIZE);
verify_reg(hkey, "Wine22b", REG_EXPAND_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine22c", REG_BINARY, NULL, 0, 0);
verify_reg(hkey, "Wine22d", REG_DWORD, NULL, 0, 0);
verify_reg(hkey, "Wine22e", REG_MULTI_SZ, NULL, 0, TODO_REG_SIZE);
verify_reg(hkey, "Wine22e", REG_MULTI_SZ, NULL, 0, 0);
verify_reg(hkey, "Wine22f", 0x100, NULL, 0, 0);
verify_reg(hkey, "Wine22g", 0xabcd, NULL, 0, 0);
verify_reg(hkey, "Wine22h", REG_BINARY, NULL, 0, 0);
......
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