...seems ok this time ^^"
corrected stack checker in checker
This commit is contained in:
parent
558f8edfab
commit
e0f584fd30
3
Makefile
3
Makefile
@ -6,7 +6,7 @@
|
||||
# By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2019/02/23 14:30:57 by tmaze #+# #+# #
|
||||
# Updated: 2019/03/17 15:11:39 by tmaze ### ########.fr #
|
||||
# Updated: 2019/03/18 14:27:44 by tmaze ### ########.fr #
|
||||
# #
|
||||
#******************************************************************************#
|
||||
|
||||
@ -103,6 +103,7 @@ clean :
|
||||
fclean : clean
|
||||
@echo -e "$(RED)===> $(GRE)$(NAME) : $(RED) Delete Binary File <===$(DEF)"
|
||||
@$(RM) -f $(NAME1) $(NAME2)
|
||||
@$(RM) -rf *.dSYM
|
||||
@$(MAKE) -C $(LIBDIR) fclean
|
||||
|
||||
re : fclean default
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/02/23 13:35:15 by tmaze #+# #+# */
|
||||
/* Updated: 2019/03/17 17:24:43 by tmaze ### ########.fr */
|
||||
/* Updated: 2019/03/18 12:28:54 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -46,7 +46,7 @@ void exec_actions(t_psdata *data)
|
||||
nop = data->op;
|
||||
while (nop && (buff = (char*)nop->content))
|
||||
{
|
||||
if (ft_strcmp(buff, "rra") == 0 || ft_strcmp(buff, "rrn") == 0)
|
||||
if (ft_strcmp(buff, "rra") == 0 || ft_strcmp(buff, "rrb") == 0)
|
||||
ps_rerot(data, buff[2]);
|
||||
else if (ft_strcmp(buff, "rrr") == 0)
|
||||
ps_rrerot(data);
|
||||
@ -98,9 +98,10 @@ void check_stack(t_psdata *data)
|
||||
int nb;
|
||||
|
||||
ind = data->a;
|
||||
if (ind)
|
||||
nb = ind->nb;
|
||||
while (ind)
|
||||
{
|
||||
nb = ind->nb;
|
||||
if (ind->nb < nb || data->size_b > 0)
|
||||
{
|
||||
ft_putendl("KO");
|
||||
@ -111,6 +112,8 @@ void check_stack(t_psdata *data)
|
||||
}
|
||||
if (!ind && data->size_b == 0)
|
||||
ft_putendl("OK");
|
||||
else
|
||||
ft_putendl("KO");
|
||||
}
|
||||
|
||||
int main(int ac, char **av)
|
||||
|
Loading…
x
Reference in New Issue
Block a user