fix and , or

This commit is contained in:
2024-04-19 14:55:01 +02:00
parent 7d696f952f
commit 73e576f109
6 changed files with 42 additions and 34 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/05 18:22:15 by marde-vr #+# #+# */
/* Updated: 2024/04/19 10:40:13 by tomoron ### ########.fr */
/* Updated: 2024/04/19 14:42:50 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -65,7 +65,8 @@ void remove_command_from_msh(t_msh *msh)
free_token(msh->tokens);
while (msh->cmds && !is_cmd_type(msh->cmds))
msh->cmds = msh->cmds->next;
while (msh->cmds && is_cmd_type(msh->cmds))
while (msh->cmds && (is_cmd_type(msh->cmds) || is_input_type(msh->cmds)
|| is_output_type(msh->cmds)))
msh->cmds = msh->cmds->next;
tmp = msh->cmds;
while (tmp && !is_cmd_type(tmp))