diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_free_words.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ft_free_words.c b/src/ft_free_words.c index 598a7ac..648706c 100644 --- a/src/ft_free_words.c +++ b/src/ft_free_words.c @@ -13,12 +13,27 @@ #include <libft.h> uint8_t + ft_free_sprites(char **sprites) +{ + uint8_t i; + + i = 0; + while (i < 9) + { + ft_memdel((void**)&sprites[i]); + i++; + } + ft_memdel((void**)&sprites); + return (0); +} + +uint8_t ft_free_words(char **words) { size_t i; i = 0; - while (words[i]) + while (words[i] && words[i][0]) { ft_memdel((void**)&words[i]); i++; |