diff --git a/libft/src/lst/ft_lst_find.c b/libft/src/lst/ft_lst_find.c index 140814e1..ef70f221 100644 --- a/libft/src/lst/ft_lst_find.c +++ b/libft/src/lst/ft_lst_find.c @@ -19,7 +19,7 @@ t_list *ft_lst_find(t_list *begin_list, void *data_ref, int (*cmp)()) list_ptr = begin_list; while (list_ptr) { - if ((*cmp)(list_ptr->content, data_ref) == 0) + if ((cmp)(list_ptr->content, data_ref) == 0) return (list_ptr); list_ptr = list_ptr->next; } diff --git a/libft/src/sstr/ft_sstrcat.c b/libft/src/sstr/ft_sstrcat.c index d0256754..313fc24d 100644 --- a/libft/src/sstr/ft_sstrcat.c +++ b/libft/src/sstr/ft_sstrcat.c @@ -26,12 +26,12 @@ char *ft_sstrcat(char **sstr, char sep) len += ft_strlen(sstr[i++]); if (!(out = ft_strnew(sizeof(char) * (len + i + 1)))) return (NULL); - ft_strcat(out, sstr[0]); + ft_strcpy(out, sstr[0]); i = 1; while (sstr[i]) { ft_strcat(out, (char[]){sep, 0}); - ft_strcat(out, sstr[i]); + ft_strcat(out, sstr[i++]); } return (out); }