protection del mal mise

This commit is contained in:
Gautier Wojda 2017-03-25 22:50:14 +01:00
parent d09f223683
commit 84cf427c3e

View file

@ -89,10 +89,10 @@ int ft_del(char **str, size_t *pos)
size_t tmp; size_t tmp;
tmp = *pos; tmp = *pos;
if (!(*str = ft_remove_imput(*str, tmp)))
return (-1);
if (!(*str && *pos < ft_strlen(*str) + 1)) if (!(*str && *pos < ft_strlen(*str) + 1))
return (0); return (0);
if (!(*str = ft_remove_imput(*str, tmp)))
return (-1);
if (*pos) if (*pos)
{ {
--(*pos); --(*pos);