aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_save_to_bmp.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-04 17:30:20 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-04 17:30:20 +0100
commita5ff8ca598adc3284be3a1d7abb2a19c08943399 (patch)
treed4de7c4386f267b8e7b03d99d55d25b3d27c63ad /src/ft_save_to_bmp.c
parentWeird mallocing (diff)
download42-cub3d-a5ff8ca598adc3284be3a1d7abb2a19c08943399.tar.gz
42-cub3d-a5ff8ca598adc3284be3a1d7abb2a19c08943399.tar.bz2
42-cub3d-a5ff8ca598adc3284be3a1d7abb2a19c08943399.tar.xz
42-cub3d-a5ff8ca598adc3284be3a1d7abb2a19c08943399.tar.zst
42-cub3d-a5ff8ca598adc3284be3a1d7abb2a19c08943399.zip
File names
Diffstat (limited to 'src/ft_save_to_bmp.c')
-rw-r--r--src/ft_save_to_bmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c
index 27b1469..79c34af 100644
--- a/src/ft_save_to_bmp.c
+++ b/src/ft_save_to_bmp.c
@@ -23,11 +23,11 @@ static char
if (ft_strrchr(ml->filename, '/'))
{
- if (!(str = (char*)malloc((ft_strlen(FT_BMP_SAVE_DIR) + ft_strlen(ft_strrchr(ml->filename, '/') + 1) - 3 + 1) * sizeof(char))))
+ if (!(str = (char*)malloc((ft_strlen(FT_BMP_SAVE_DIR) + ft_strlen(ft_strrchr(ml->filename, '/') + 1) + 1) * sizeof(char))))
return (NULL);
- ft_printf("%lu\n", (ft_strlen(FT_BMP_SAVE_DIR) + ft_strlen((ft_strrchr(ml->filename, '/') + 1)) - 3 + 1));
+ ft_printf("%lu\n", (ft_strlen(FT_BMP_SAVE_DIR) + ft_strlen((ft_strrchr(ml->filename, '/') + 1)) + 1));
ft_sprintf(str, "%s%s.bmp", FT_BMP_SAVE_DIR,
- ft_strrchr(ml->filename, '/') + 1);
+ ft_strrchr(ml->filename, '/') + 1);
return (str);
}
else