Use length() instead of size()
To be consistent with everything else.
This commit is contained in:
parent
91345a149e
commit
c6aa25acd5
1 changed files with 1 additions and 1 deletions
|
@ -83,8 +83,8 @@ BOOL GetUserNameW(WCHAR_T* lpBuffer, LPDWORD lpnSize)
|
|||
}
|
||||
|
||||
// Get username from system in a thread-safe manner
|
||||
int ret = getlogin_r(&username[0], username.size());
|
||||
std::string username(LOGIN_NAME_MAX, 0);
|
||||
int ret = getlogin_r(&username[0], username.length());
|
||||
// Map errno to Win32 Error Codes
|
||||
if (ret)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue