From a5ff8ca598adc3284be3a1d7abb2a19c08943399 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 4 Mar 2020 17:30:20 +0100 Subject: File names --- src/ft_save_to_bmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3