This commit is contained in:
Maieul BOYER 2024-02-12 20:49:08 +01:00
parent 0774f4e358
commit aecb67a24d
No known key found for this signature in database
4 changed files with 19 additions and 9 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/11 16:26:04 by maiboyer #+# #+# */
/* Updated: 2024/02/08 19:16:59 by maiboyer ### ########.fr */
/* Updated: 2024/02/10 18:39:03 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -19,7 +19,7 @@ void rev_rotate_inner(t_vec_i64 *stack, t_const_str tag,
t_i64 e;
(void)(tag);
if (stack->len <= 1)
if (stack->len < 2)
return ;
vec_i64_pop(stack, &e);
vec_i64_push_front(stack, e);

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/11 16:26:04 by maiboyer #+# #+# */
/* Updated: 2024/02/08 19:17:46 by maiboyer ### ########.fr */
/* Updated: 2024/02/10 18:38:52 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -18,7 +18,7 @@ void rotate_inner(t_vec_i64 *stack, t_const_str tag, t_const_str print)
t_i64 e;
(void)(tag);
if (stack->len <= 1)
if (stack->len < 2)
return;
vec_i64_pop_front(stack, &e);
vec_i64_push(stack, e);