diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-05 15:59:52 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-03-05 15:59:52 +0100 |
commit | 3a346b70624949dcf7f4bec385c840441c6e3e31 (patch) | |
tree | ca47ed855d8464c35cc5ef892d120391bf1314ec /src/ft_save_to_bmp.c | |
parent | Pretty cool (diff) | |
download | 42-cub3d-3a346b70624949dcf7f4bec385c840441c6e3e31.tar.gz 42-cub3d-3a346b70624949dcf7f4bec385c840441c6e3e31.tar.bz2 42-cub3d-3a346b70624949dcf7f4bec385c840441c6e3e31.tar.xz 42-cub3d-3a346b70624949dcf7f4bec385c840441c6e3e31.tar.zst 42-cub3d-3a346b70624949dcf7f4bec385c840441c6e3e31.zip |
Get normed
Diffstat (limited to 'src/ft_save_to_bmp.c')
-rw-r--r-- | src/ft_save_to_bmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c index 648cba6..90bbb1f 100644 --- a/src/ft_save_to_bmp.c +++ b/src/ft_save_to_bmp.c @@ -26,11 +26,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) - + 1) * sizeof(char)))) + ft_strlen(ft_strrchr(ml->filename, '/') + 1) + + 1) * sizeof(char)))) return (NULL); ft_sprintf(str, "%s%s", FT_BMP_SAVE_DIR, - ft_strrchr(ml->filename, '/') + 1); + ft_strrchr(ml->filename, '/') + 1); } else { @@ -91,7 +91,7 @@ static int8_t bmp_info.height = h; bmp_info.bit_count = 24; bmp_info.size_image = size; - if (!(fd = open(fname, O_RDWR | O_CREAT , 0644))) + if (!(fd = open(fname, O_RDWR | O_CREAT, 0644))) return (-1); write(fd, &bmp_file, sizeof(t_bmp_file)); write(fd, &bmp_info, sizeof(t_bmp_info)); |