aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_save_to_bmp.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-21 21:48:21 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-21 21:48:21 +0100
commitdd9ad2eb8384f7dc2f66f0c6c14f033e6fec56b0 (patch)
tree086f81c4486d44c811c971f598463c1e37ea546a /src/ft_save_to_bmp.c
parentFix (diff)
download42-cub3d-dd9ad2eb8384f7dc2f66f0c6c14f033e6fec56b0.tar.gz
42-cub3d-dd9ad2eb8384f7dc2f66f0c6c14f033e6fec56b0.tar.bz2
42-cub3d-dd9ad2eb8384f7dc2f66f0c6c14f033e6fec56b0.tar.xz
42-cub3d-dd9ad2eb8384f7dc2f66f0c6c14f033e6fec56b0.tar.zst
42-cub3d-dd9ad2eb8384f7dc2f66f0c6c14f033e6fec56b0.zip
fixed most valgrind bullshit
Diffstat (limited to 'src/ft_save_to_bmp.c')
-rw-r--r--src/ft_save_to_bmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c
index 1737226..24d28d8 100644
--- a/src/ft_save_to_bmp.c
+++ b/src/ft_save_to_bmp.c
@@ -53,8 +53,8 @@ static uint8_t
uint32_t i;
(void)img;
- if (!(bmp = (uint8_t*)malloc((3 * cl->wlist.x_size
- * cl->wlist.y_size) * sizeof(uint8_t))))
+ if (!(bmp = (uint8_t*)ft_calloc(3 * cl->wlist.x_size
+ * cl->wlist.y_size, sizeof(uint8_t))))
return (NULL);
y = cl->wlist.y_size;
i = 0;