diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_save_to_bmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_save_to_bmp.c b/src/ft_save_to_bmp.c index 7d242c6..bc4547a 100644 --- a/src/ft_save_to_bmp.c +++ b/src/ft_save_to_bmp.c @@ -52,6 +52,7 @@ static uint8_t uint32_t x; uint32_t i; + (void)img; if (!(bmp = (uint8_t*)malloc((3 * cl->wlist.x_size * cl->wlist.y_size) * sizeof(uint8_t)))) return (NULL); @@ -62,7 +63,7 @@ static uint8_t x = -1; while (++x < cl->wlist.x_size) { - px = ft_hex_to_rgb(*(int*)(img.ptr + (x * 4 + (y * img.sizeline)))); + px = ft_hex_to_rgb(*(int*)(cl->img.ptr + (x * 4 + (y * cl->img.sizeline)))); *(bmp + i++) = (uint8_t)px.b; *(bmp + i++) = (uint8_t)px.g; *(bmp + i++) = (uint8_t)px.r; |