mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-20 05:49:55 +00:00
Fixed username detection bug
This commit is contained in:
parent
b625d2e891
commit
dd8bbcad97
1 changed files with 2 additions and 2 deletions
|
|
@ -258,8 +258,8 @@ Oneshot::Oneshot(const RGSSThreadData &threadData)
|
|||
struct passwd *pwd = getpwuid(getuid());
|
||||
if (pwd)
|
||||
{
|
||||
if (pwd->pw_gecos && pwd->pw_gecos[0] != ',')
|
||||
{
|
||||
if (pwd->pw_gecos && pwd->pw_gecos[0] && pwd->pw_gecos[0] != ',')
|
||||
{
|
||||
//Get the user's full name
|
||||
int comma = 0;
|
||||
for (; pwd->pw_gecos[comma] && pwd->pw_gecos[comma] != ','; ++comma) {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue