mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Use L_cuserid instead of 64 and given lpnSize
This commit is contained in:
1 parent
3ab3408378
commit
e8cb7e24fe
2 files changed
+3
-3
No files matched your search
@@ -43,8 +43,8 @@ BOOL GetUserName(WCHAR_T *lpBuffer, LPDWORD lpnSize)
|
||||
}
|
||||
|
||||
// Get username from system in a thread-safe manner
|
||||
char userName[*lpnSize];
|
||||
int err = getlogin_r(userName, *lpnSize);
|
||||
char userName[L_cuserid];
|
||||
int err = getlogin_r(userName, L_cuserid);
|
||||
// Map errno to Win32 Error Codes
|
||||
if (err != 0) {
|
||||
switch (errno) {
|
||||
|
||||
Reference in new issue
Block a user