diff --git a/srcs/ps_rerot.c b/srcs/ps_rerot.c index 77bdb15..3d99203 100644 --- a/srcs/ps_rerot.c +++ b/srcs/ps_rerot.c @@ -6,7 +6,7 @@ /* By: tmaze +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/02/21 16:32:04 by tmaze #+# #+# */ -/* Updated: 2019/03/20 21:33:00 by tmaze ### ########.fr */ +/* Updated: 2019/03/26 15:06:28 by tmaze ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,11 +29,8 @@ void ps_rerot(t_psdata *data, char c) if (s != NULL && *size > 2) { tmp = s->next; - while (tmp->next != NULL) - { - tmp = tmp->next; + while (tmp->next != NULL && (tmp = tmp->next)) s = s->next; - } s->next = NULL; (*size)--; ps_stkpsh(data, c, tmp);