mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-15 14:22:57 -06:00
Core: GetUserName now using getlogin_r instead of environment
This commit is contained in:
parent
b2744e1689
commit
3d0e0e786a
1 changed files with 3 additions and 0 deletions
|
|
@ -719,6 +719,9 @@ String GetUserName()
|
|||
::GetUserNameW(temp, &w);
|
||||
return temp;
|
||||
#else
|
||||
char user[1000];
|
||||
if(getlogin_r(user, 999))
|
||||
return user;
|
||||
return Nvl(GetEnv("USER"), "root");
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue