aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_free_words.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-03-12 18:56:59 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-03-12 18:56:59 +0100
commit141fb4d33f73cac99b1b19e475f83fb755f208a2 (patch)
treee93c2d490440caee29f2c85d86c9dc9bd8512a28 /src/ft_free_words.c
parentkk (diff)
download42-cub3d-141fb4d33f73cac99b1b19e475f83fb755f208a2.tar.gz
42-cub3d-141fb4d33f73cac99b1b19e475f83fb755f208a2.tar.bz2
42-cub3d-141fb4d33f73cac99b1b19e475f83fb755f208a2.tar.xz
42-cub3d-141fb4d33f73cac99b1b19e475f83fb755f208a2.tar.zst
42-cub3d-141fb4d33f73cac99b1b19e475f83fb755f208a2.zip
good
Diffstat (limited to '')
-rw-r--r--src/ft_free_words.c17
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++;