resolve segfault for close right wall view

This commit is contained in:
hugogogo
2022-05-04 00:58:20 +02:00
parent 3c76a8646a
commit b5f3d2d384
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ static int get_texture(t_img *img, int imgx, int j, int height)
int y;
int position;
y = (j * img->height) / height;
y = ((long)j * (long)img->height) / height;
position = y * img->szl + imgx * (img->bpp / 8);
color = img->data + position;
return (*(int *)color);