aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_verline.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-17 16:24:04 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-17 16:24:04 +0100
commit9af56266c16eaffe9375ba3edb3465c33f015b9f (patch)
treeefc8c7adf952ad533f362bf147667cbc5a8a30f7 /src/ft_draw_verline.c
parentBetter parse (diff)
download42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.tar.gz
42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.tar.bz2
42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.tar.xz
42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.tar.zst
42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.zip
ready to merge
Diffstat (limited to 'src/ft_draw_verline.c')
-rw-r--r--src/ft_draw_verline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c
index d7ebe34..5c5ed29 100644
--- a/src/ft_draw_verline.c
+++ b/src/ft_draw_verline.c
@@ -15,7 +15,7 @@
static void
ft_draw_floor(t_cub *cl, int32_t y, int32_t x)
{
- while (y < cl->wlist->y_size)
+ while ((uint32_t)y < cl->wlist->y_size)
{
*(int*)(cl->img.ptr +
(x * 4 + (y * cl->img.sizeline))) = ft_rgb_to_hex(cl->f_rgb);
@@ -47,7 +47,7 @@ int8_t
y1 = 0;
if (y2 < 0)
y2 = 0;
- if (y2 >= cl->wlist->y_size)
+ if ((uint32_t)y2 >= cl->wlist->y_size)
y2 = cl->wlist->x_size - 1;
if (y1 > y2)
{