Commit aa5358fd authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Alexandre Julliard

kernel32: gethostname returns string in CP_UNIXCP encoding.

parent d2bd90f9
......@@ -268,7 +268,7 @@ void COMPUTERNAME_Init (void)
dot = strchr ( hbuf, '.' );
if ( dot ) *dot = 0;
hlen = strlen ( hbuf );
len = MultiByteToWideChar( CP_ACP, 0, hbuf, hlen + 1, computer_name, MAX_COMPUTERNAME_LENGTH + 1 )
len = MultiByteToWideChar( CP_UNIXCP, 0, hbuf, hlen + 1, computer_name, MAX_COMPUTERNAME_LENGTH + 1 )
* sizeof( WCHAR );
if ( NtSetValueKey( hsubkey, &nameW, 0, REG_SZ, computer_name, len ) != STATUS_SUCCESS )
WARN ( "failed to set ComputerName\n" );
......
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