resolve segfault for close right wall view
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user