check doubles before ordered
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user