check doubles before ordered

This commit is contained in:
hugogogo
2021-09-27 17:04:07 +02:00
parent 2d37058a43
commit ad26efb454

View File

@@ -38,10 +38,10 @@ int check_valid(t_stack *list)
{
if (!list)
return (0);
if (is_ordered(list) == 1)
return (0);
if (has_doubles(list) == 1)
ps_stop(NULL, (t_list *)list, 3);
if (is_ordered(list) == 1)
return (0);
return (1);
}