regedit: Null terminate hex-formatted REG_SZ data if necessary.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3cc1e2315f
commit
829c0ced69
|
@ -507,7 +507,8 @@ static void free_parser_data(struct parser *parser)
|
||||||
|
|
||||||
static void prepare_hex_string_data(struct parser *parser)
|
static void prepare_hex_string_data(struct parser *parser)
|
||||||
{
|
{
|
||||||
if (parser->data_type == REG_EXPAND_SZ || parser->data_type == REG_MULTI_SZ)
|
if (parser->data_type == REG_EXPAND_SZ || parser->data_type == REG_MULTI_SZ ||
|
||||||
|
parser->data_type == REG_SZ)
|
||||||
{
|
{
|
||||||
if (parser->is_unicode)
|
if (parser->is_unicode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3679,7 +3679,7 @@ static void test_export(void)
|
||||||
verify_reg(hkey, "Wine4a", REG_DWORD, &dword, sizeof(dword), 0);
|
verify_reg(hkey, "Wine4a", REG_DWORD, &dword, sizeof(dword), 0);
|
||||||
verify_reg(hkey, "Wine4b", REG_SZ, "\0\0\0\0\0\0\0", 4, 0);
|
verify_reg(hkey, "Wine4b", REG_SZ, "\0\0\0\0\0\0\0", 4, 0);
|
||||||
verify_reg(hkey, "Wine4c", REG_SZ, "Value", 6, 0);
|
verify_reg(hkey, "Wine4c", REG_SZ, "Value", 6, 0);
|
||||||
verify_reg(hkey, "Wine4d", REG_SZ, "\0abc", 5, TODO_REG_SIZE);
|
verify_reg(hkey, "Wine4d", REG_SZ, "\0abc", 5, 0);
|
||||||
dword = 0x100;
|
dword = 0x100;
|
||||||
verify_reg(hkey, "Wine4e", REG_DWORD, &dword, sizeof(dword), 0);
|
verify_reg(hkey, "Wine4e", REG_DWORD, &dword, sizeof(dword), 0);
|
||||||
verify_reg(hkey, "Wine4f", REG_SZ, "\0Value", 7, 0);
|
verify_reg(hkey, "Wine4f", REG_SZ, "\0Value", 7, 0);
|
||||||
|
|
Loading…
Reference in New Issue