diff --git a/lexer.c b/lexer.c index 474a6c8..93be36a 100755 --- a/lexer.c +++ b/lexer.c @@ -41,7 +41,7 @@ int create_token(t_lexer *lex, char str[]) int set_redir(t_lexer *lex, char **line, char ch) { - static t_type type_out[2] = {ADD, OUT}; + static t_type type_out[2] = {OUT, ADD}; static t_type type_in[2] = {IN, HD}; t_type *type; @@ -52,9 +52,9 @@ int set_redir(t_lexer *lex, char **line, char ch) if (**line == ch && (*line)++) { if (**line == ch && (*line)++) - lex->next_type = type[0]; - else lex->next_type = type[1]; + else + lex->next_type = type[0]; return (1); } return (0);