mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 422788 - reduce ambiguous wide/narrow char windows api calls in toolkit
This commit is contained in:
parent
af375d4358
commit
b46984e309
@ -58,14 +58,13 @@ nsUserInfo::GetUsername(char **aUsername)
|
||||
{
|
||||
*aUsername = nsnull;
|
||||
|
||||
TCHAR username[256];
|
||||
PRUnichar username[256];
|
||||
DWORD size = 256;
|
||||
|
||||
if (!GetUserName(username, &size))
|
||||
if (!GetUserNameW(username, &size))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aUsername = nsCRT::strdup(username);
|
||||
|
||||
*aUsername = ToNewUTF8String(nsDependentString(username));
|
||||
if (*aUsername) return NS_OK;
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user