Commit 314d968d authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Fixed small off by one error in GetComputerName32W, always killed the

last character of a hostname.
parent d982a71b
......@@ -67,9 +67,8 @@ BOOL32 WINAPI GetComputerName32W(LPWSTR name,LPDWORD size)
{
LPSTR nameA = (LPSTR)HeapAlloc( GetProcessHeap(), 0, *size);
BOOL32 ret = GetComputerName32A(nameA,size);
if (ret) lstrcpynAtoW(name,nameA,*size);
if (ret) lstrcpynAtoW(name,nameA,*size+1);
HeapFree( GetProcessHeap(), 0, nameA );
/* FIXME : size correct? */
return ret;
}
......
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