regedit: Correctly import hex values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
56b223adfa
commit
84dda23536
|
@ -885,6 +885,9 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
|
||||||
{
|
{
|
||||||
WCHAR *line = pos;
|
WCHAR *line = pos;
|
||||||
|
|
||||||
|
if (!*line)
|
||||||
|
goto set_value;
|
||||||
|
|
||||||
if (!convert_hex_csv_to_hex(parser, &line))
|
if (!convert_hex_csv_to_hex(parser, &line))
|
||||||
goto invalid;
|
goto invalid;
|
||||||
|
|
||||||
|
@ -896,6 +899,7 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
|
||||||
|
|
||||||
prepare_hex_string_data(parser);
|
prepare_hex_string_data(parser);
|
||||||
|
|
||||||
|
set_value:
|
||||||
set_state(parser, SET_VALUE);
|
set_state(parser, SET_VALUE);
|
||||||
return line;
|
return line;
|
||||||
|
|
||||||
|
|
|
@ -662,10 +662,10 @@ static void test_basic_import(void)
|
||||||
"\"Wine22h\"=hex:\n"
|
"\"Wine22h\"=hex:\n"
|
||||||
"\"Wine22i\"=hex(0):\n\n");
|
"\"Wine22i\"=hex(0):\n\n");
|
||||||
verify_reg(hkey, "Wine22a", REG_SZ, NULL, 0, 0);
|
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, "Wine22c", REG_BINARY, NULL, 0, 0);
|
||||||
verify_reg(hkey, "Wine22d", REG_DWORD, 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, "Wine22f", 0x100, NULL, 0, 0);
|
||||||
verify_reg(hkey, "Wine22g", 0xabcd, NULL, 0, 0);
|
verify_reg(hkey, "Wine22g", 0xabcd, NULL, 0, 0);
|
||||||
verify_reg(hkey, "Wine22h", REG_BINARY, 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"
|
"\"Wine22h\"=hex:\n"
|
||||||
"\"Wine22i\"=hex(0):\n\n");
|
"\"Wine22i\"=hex(0):\n\n");
|
||||||
verify_reg(hkey, "Wine22a", REG_SZ, NULL, 0, 0);
|
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, "Wine22c", REG_BINARY, NULL, 0, 0);
|
||||||
verify_reg(hkey, "Wine22d", REG_DWORD, 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, "Wine22f", 0x100, NULL, 0, 0);
|
||||||
verify_reg(hkey, "Wine22g", 0xabcd, NULL, 0, 0);
|
verify_reg(hkey, "Wine22g", 0xabcd, NULL, 0, 0);
|
||||||
verify_reg(hkey, "Wine22h", REG_BINARY, NULL, 0, 0);
|
verify_reg(hkey, "Wine22h", REG_BINARY, NULL, 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue