Fixed small off by one error in GetComputerName32W, always killed the
last character of a hostname.
This commit is contained in:
parent
d982a71b8a
commit
314d968d52
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue