jdagz28 / Minishell

0 stars 0 forks source link

username->machinename makes program abort (at 19) #50

Closed jdagz28 closed 11 months ago

jdagz28 commented 11 months ago
int user_init(t_user *user, char **env)
{
    user->username = env_get("USER=", 0, env);
    **user->machinename = env_get("SESSION_MANAGER=local/", ':', env);**
    if (!user->username || !user->machinename)
    {
        user_clear(user);
        return (EXIT_FAILURE);
    }
    user->lastinput = NULL;
    return (EXIT_SUCCESS);
}

that one is empty; not in the env of 19 computers

Screen Shot 2023-11-26 at 7 27 28 PM

errors:

Screen Shot 2023-11-26 at 7 26 30 PM
jdagz28 commented 11 months ago

fixed. set machinename if NULL