exit stauts alphabetic and setenv error assignement word

This commit is contained in:
Antoine Riard 2017-03-21 01:45:03 +01:00
parent f47f07fa0b
commit 28d5351c4a
2 changed files with 3 additions and 3 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */ /* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/28 14:28:41 by jhalford #+# #+# */ /* Created: 2016/11/28 14:28:41 by jhalford #+# #+# */
/* Updated: 2017/03/21 00:31:59 by ariard ### ########.fr */ /* Updated: 2017/03/21 01:44:13 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */ /* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/28 14:25:17 by jhalford #+# #+# */ /* Created: 2016/11/28 14:25:17 by jhalford #+# #+# */
/* Updated: 2017/03/21 00:21:46 by ariard ### ########.fr */ /* Updated: 2017/03/21 01:43:33 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -58,7 +58,7 @@ int builtin_setenv(const char *path,
esc = ft_strnew((ft_strlen(av[1]) >> 3) + 1); esc = ft_strnew((ft_strlen(av[1]) >> 3) + 1);
ret = word_is_assignment((char *[]){av[1], (esc + 1)}); ret = word_is_assignment((char *[]){av[1], (esc + 1)});
ft_strdel(&esc); ft_strdel(&esc);
if (!ret && av[1][0] != '?') if (!ret && ft_strcmp(av[1], "?"))
return (error_msg(SETERR_0)); return (error_msg(SETERR_0));
assign_var(av, env); assign_var(av, env);
} }