Skip to content

Commit

Permalink
fixed parser not fetching path array in lexer when it was set appropr…
Browse files Browse the repository at this point in the history
…iately
  • Loading branch information
Jean Teissier authored and Jean Teissier committed Jul 14, 2024
1 parent f2f6964 commit 4aa406e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/parser/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: jteissie <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/01 13:21:33 by jteissie #+# #+# */
/* Updated: 2024/07/12 19:02:13 by jteissie ### ########.fr */
/* Updated: 2024/07/14 13:21:44 by jteissie ### ########.fr */
/* */
/* ************************************************************************** */

Expand All @@ -30,7 +30,12 @@ char *make_cmd_buffer(t_token *roaming)
return (NULL);
}
else
cmd_buff = ft_strdup(roaming->lexstr);
{
if (roaming->path)
cmd_buff = ft_strdup(roaming->path);
else
cmd_buff = ft_strdup(roaming->lexstr);
}
roaming->type = TK_RESERVED;
}
roaming = roaming->next;
Expand Down

0 comments on commit 4aa406e

Please sign in to comment.