resolve segfault for close right wall view
This commit is contained in:
@@ -8,7 +8,7 @@ F 220 , 100, 30
|
||||
C 225 , 30 , 0
|
||||
|
||||
1111111111111111111111111111
|
||||
10000000000000000111N0000001
|
||||
10000000000000000111W0000001
|
||||
1111000000000000100000110001
|
||||
1111001000000000000110000111
|
||||
1000000000000000010101000001
|
||||
|
||||
@@ -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