Commit 7c824cbf authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Open export file with a wide-character stream.

parent 86ebd5ee
......@@ -1238,15 +1238,15 @@ static FILE *REGPROC_open_export_file(WCHAR *file_name, BOOL unicode)
_setmode(_fileno(file), _O_BINARY);
} else
{
CHAR* file_nameA = GetMultiByteString(file_name);
file = fopen(file_nameA, "wb");
WCHAR wb_mode[] = {'w','b',0};
WCHAR regedit[] = {'r','e','g','e','d','i','t',0};
file = _wfopen(file_name, wb_mode);
if (!file) {
perror("");
_wperror(regedit);
output_message(STRING_CANNOT_OPEN_FILE, file_name);
HeapFree(GetProcessHeap(), 0, file_nameA);
exit(1);
}
HeapFree(GetProcessHeap(), 0, file_nameA);
}
if(unicode)
{
......
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