Browse Source

fix redirs

master
narnaud 3 years ago
parent
commit
7229dc5996
  1. 6
      lexer.c

6
lexer.c

@ -41,7 +41,7 @@ int create_token(t_lexer *lex, char str[])
int set_redir(t_lexer *lex, char **line, char ch) 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}; static t_type type_in[2] = {IN, HD};
t_type *type; 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)++)
{ {
if (**line == ch && (*line)++) if (**line == ch && (*line)++)
lex->next_type = type[0];
else
lex->next_type = type[1]; lex->next_type = type[1];
else
lex->next_type = type[0];
return (1); return (1);
} }
return (0); return (0);

Loading…
Cancel
Save