The boss addition relied on ft_vec_append which makes the new entry be
at the end. This messes with the ordering as added entries are ready to
be defeated hence should be at the top. This commit uses insert to
insert the new entry to the very top which conserves the ordering
property.
else if (com->basic == basic_remove)
ft_vec_erase(database, ind, free_entry);
else if (com->basic == basic_add)
- ft_vec_append(database, &com->entry);
+ ft_vec_insert(database, &com->entry, 0);
else if (com->basic == basic_list)
{
if (com->entry.name == NULL)