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

last character of a hostname.
This commit is contained in:
Marcus Meissner 1998-11-01 14:04:45 +00:00 committed by Alexandre Julliard
parent d982a71b8a
commit 314d968d52
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}