aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_save_to_bmp.c
diff options
context:
space:
mode:
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