corrected rerot

This commit is contained in:
Tanguy MAZE 2019-03-26 15:37:11 +01:00
parent d6d98b954f
commit 5a11c5f4cb

View File

@ -6,7 +6,7 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);