mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 11:26:51 +01:00
「🔨」 fix(env commands): fixed segfault
This commit is contained in:
@ -26,6 +26,7 @@
|
|||||||
# include <dirent.h>
|
# include <dirent.h>
|
||||||
# include "libft.h"
|
# include "libft.h"
|
||||||
|
|
||||||
|
# include "env.h"
|
||||||
# include "parsing.h"
|
# include "parsing.h"
|
||||||
# include "execution.h"
|
# include "execution.h"
|
||||||
|
|
||||||
|
8
src/env/env_setters.c
vendored
8
src/env/env_setters.c
vendored
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/22 14:42:52 by mmoussou #+# #+# */
|
/* Created: 2024/05/22 14:42:52 by mmoussou #+# #+# */
|
||||||
/* Updated: 2024/05/22 14:49:35 by mmoussou ### ########.fr */
|
/* Updated: 2024/05/27 18:05:18 by mmoussou ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -64,9 +64,11 @@ int env_init(char **env_d, t_env *env)
|
|||||||
while (env_d[++i])
|
while (env_d[++i])
|
||||||
{
|
{
|
||||||
if (bool_first_el)
|
if (bool_first_el)
|
||||||
|
{
|
||||||
i = env_create_first_el(env_d[i], env);
|
i = env_create_first_el(env_d[i], env);
|
||||||
if (bool_first_el && i < 0)
|
if (i < 0)
|
||||||
return (1);
|
return (1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new = env_create_el(env_d[i]);
|
new = env_create_el(env_d[i]);
|
||||||
|
Reference in New Issue
Block a user