protect empty env
This commit is contained in:
parent
f0837247bd
commit
e550d2bb37
@ -6,7 +6,7 @@
|
|||||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/09/19 17:08:46 by tmaze #+# #+# */
|
/* Created: 2019/09/19 17:08:46 by tmaze #+# #+# */
|
||||||
/* Updated: 2020/02/01 15:54:34 by tmaze ### ########.fr */
|
/* Updated: 2020/02/07 15:11:58 by tmaze ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ t_env *env2lst(char **env)
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
while (env[i])
|
while (env && env[i])
|
||||||
{
|
{
|
||||||
if ((new = ft_envnew(env[i])) != NULL)
|
if ((new = ft_envnew(env[i])) != NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user