diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_save_to_bmp.c | 4 |
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; |