regedit: Correctly export 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
a437382f4d
commit
aabdc271f8
|
@ -1300,6 +1300,8 @@ static void export_hex_data(FILE *fp, WCHAR **buf, DWORD type, DWORD line_len,
|
||||||
|
|
||||||
line_len += export_hex_data_type(fp, type, unicode);
|
line_len += export_hex_data_type(fp, type, unicode);
|
||||||
|
|
||||||
|
if (!size) return;
|
||||||
|
|
||||||
if (!unicode && (type == REG_EXPAND_SZ || type == REG_MULTI_SZ))
|
if (!unicode && (type == REG_EXPAND_SZ || type == REG_MULTI_SZ))
|
||||||
data = GetMultiByteStringN(data, size / sizeof(WCHAR), &size);
|
data = GetMultiByteStringN(data, size / sizeof(WCHAR), &size);
|
||||||
|
|
||||||
|
@ -1354,8 +1356,12 @@ static void export_data(FILE *fp, WCHAR *value_name, DWORD value_len, DWORD type
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
REGPROC_write_line(fp, buf, unicode);
|
if (size || type == REG_SZ)
|
||||||
heap_free(buf);
|
{
|
||||||
|
REGPROC_write_line(fp, buf, unicode);
|
||||||
|
heap_free(buf);
|
||||||
|
}
|
||||||
|
|
||||||
export_newline(fp, unicode);
|
export_newline(fp, unicode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue